/** * Creates an internal frame. * * @return the created panel. */ protected SInternalFrame createSInternalFrame() { SInternalFrame iFrame = new SInternalFrame(); iFrame.setPreferredSize(SDimension.FULLAREA); iFrame.getContentPane().setPreferredSize(SDimension.FULLAREA); iFrame.setHorizontalAlignment(SConstants.LEFT_ALIGN); iFrame.setVerticalAlignment(SConstants.TOP_ALIGN); return iFrame; }
public void addInternalFrameListener(SInternalFrameListener listener) { addEventListener(SInternalFrameListener.class, listener); }
String text = frame.getTitle(); if (text == null) text = "wingS"; String style = frame.getStyle(SInternalFrame.SELECTOR_TITLE); if (style != null) device.print("<div class=\"" + style + "\" id=\""); else device.print("<div class=\"WindowBar\" id=\""); device.print(frame.getName()); device.print("_titlebar\""); StringBuilder titleArea = Utils.inlineStyles(frame.getDynamicStyle(SInternalFrame.SELECTOR_TITLE)); Utils.optAttribute(device, "style", titleArea); device.print(">"); if (frame.isClosable() && closeIcon != null) { writeWindowIcon(device, frame, SInternalFrameEvent.INTERNAL_FRAME_CLOSED, closeIcon, BUTTONICON_CLASSNAME); if (frame.isMaximized() && unmaximizeIcon != null) { writeWindowIcon(device, frame, SInternalFrameEvent.INTERNAL_FRAME_UNMAXIMIZED, unmaximizeIcon, BUTTONICON_CLASSNAME); if (frame.isMaximizable() && !frame.isMaximized() && maximizeIcon != null) { writeWindowIcon(device, frame, SInternalFrameEvent.INTERNAL_FRAME_MAXIMIZED, maximizeIcon, BUTTONICON_CLASSNAME); if (frame.isIconified() && deiconifyIcon != null) {
@Override public void writeInternal(final Device device, final SComponent _c) throws IOException { SInternalFrame frame = (SInternalFrame)_c; // Optional attribute to identify the internal frame for // SDialog and SOptionPane usage. Map optionalAttributes = new HashMap(); optionalAttributes.put("SComponentClass", "org.wings.SInternalFrame"); writeDivPrefix(device, frame, optionalAttributes); writeWindowBar(device, frame); // write the actual content if (!frame.isIconified()) { String style = frame.getStyle(SInternalFrame.SELECTOR_CONTENT); if (style != null) device.print("<div class=\"" + style + '"'); else device.print("<div class=\"WindowContent\""); StringBuilder contentArea = Utils.inlineStyles(frame.getDynamicStyle(SInternalFrame.SELECTOR_CONTENT)); Utils.optAttribute(device, "style", contentArea); device.print(">"); Utils.renderContainer(device, frame); device.print("</div>"); } writeDivSuffix(device, frame); }
/** * @param component The internal frame to be added. * @param constraints nothing */ @Override public SComponent addComponent(SComponent component, Object constraints, int index) { if (constraints == null) constraints = component.getName(); ((SInternalFrame)component).addInternalFrameListener(listener); return super.addComponent(component, constraints, index); }
super.fireFinalEvents(); Object[] listeners = getListenerList();
@Override protected void writeWindowBar(final Device device, SInternalFrame frame) throws IOException { String text = frame.getTitle(); if (text == null) text = "wingS"; device.print(frame.getName()); device.print("_titlebar\">"); device.print("<table width=\"100%\"><tr><td width=\"100%\"><div class=\"WindowBar_title\">"); if (frame.getIcon() != null) { writeIcon(device, frame.getIcon(), WINDOWICON_CLASSNAME); if (frame.isIconifyable() && !frame.isIconified() && getIconifyIcon() != null) { device.print("<td>"); writeWindowIcon(device, frame, if (frame.isIconified() && getDeiconifyIcon() != null) { device.print("<td>"); writeWindowIcon(device, frame, if (frame.isMaximizable() && !frame.isMaximized() && getMaximizeIcon() != null) { device.print("<td>"); writeWindowIcon(device, frame, if (frame.isMaximized() && getUnmaximizeIcon() != null) { device.print("<td>"); writeWindowIcon(device, frame, if (frame.isClosable() && getCloseIcon() != null) { device.print("<td>");
/** * Creates an internal frame. * * @return the created panel. */ protected SInternalFrame createSInternalFrame() { SInternalFrame iFrame = new SInternalFrame(); iFrame.setPreferredSize(SDimension.FULLAREA); iFrame.getContentPane().setPreferredSize(SDimension.FULLAREA); iFrame.setHorizontalAlignment(SConstants.LEFT_ALIGN); iFrame.setVerticalAlignment(SConstants.TOP_ALIGN); return iFrame; }