/** * Gets the Iconifiable attribute of the InternalFrameWindow * object * * @return The Iconifiable value */ public boolean isIconifiable() { return frame.isIconifiable(); }
@Override @Nullable protected Pair<Boolean, Point> executeInEDT() throws Throwable { checkShowingOrIconified(internalFrame); if (!internalFrame.isIconifiable()) { String msg = String.format("The JInternalFrame <%s> is not iconifiable.", format(internalFrame)); throw new IllegalStateException(msg); } return iconifyInfo(internalFrame); } });
public void actionPerformed(ActionEvent evt) { if (evt.getSource() instanceof JToggleButton) { // Either iconify the frame or deiconify and activate it. JToggleButton button = (JToggleButton) evt.getSource(); try { boolean selected = button.isSelected(); if (!selected && !frame.isIconifiable()) { button.setSelected(true); } else { frame.setIcon(!selected); if (selected) { frame.setSelected(true); } } } catch (PropertyVetoException e2) { } } }
/** * Set the enable/disabled state for the buttons. */ private void enableActions() { restoreAction.setEnabled(frame.isMaximum() || frame.isIcon()); maximizeAction.setEnabled((frame.isMaximizable() && !frame.isMaximum() && !frame.isIcon()) || (frame.isMaximizable() && frame.isIcon())); iconifyAction.setEnabled(frame.isIconifiable() && !frame.isIcon()); closeAction.setEnabled(frame.isClosable()); sizeAction.setEnabled(false); moveAction.setEnabled(false); }
/** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ public void actionPerformed(ActionEvent e) { if (frame.isIconifiable()) { if (!frame.isIcon()) { try { frame.setIcon(true); } catch (PropertyVetoException e1) { } } else { try { frame.setIcon(false); } catch (PropertyVetoException e1) { } } } } }
@ScriptFunction(jsDoc = MINIMIZE_ALL_JSDOC) public void minimizeAll() throws PropertyVetoException { for (JInternalFrame f : getAllFrames()) { if (f.isIconifiable() && !f.isIcon()) { f.setIcon(true); } } }
@Override public void actionPerformed(ActionEvent e) { List<RegisteredFrame> frames = frameRegistry.getInternalFrames(); for (RegisteredFrame frame : frames) { if (frame instanceof JInternalFrame && (group == null || frame.getGroup().equals(group))) { JInternalFrame internalF = ((JInternalFrame) frame); if (internalF.isIconifiable() && !internalF.isIcon()) { try { internalF.setIcon(true); } catch (PropertyVetoException e1) { e1.printStackTrace(); } } } } }
public void setPalette(boolean b) { isPalette = b; if (isPalette) { closeButton.setIcon(paletteCloseIcon); if (frame.isMaximizable()) { remove(maxButton); } if (frame.isIconifiable()) { remove(iconButton); } } else { closeButton.setIcon(closeIcon); if (frame.isMaximizable()) { add(maxButton); } if (frame.isIconifiable()) { add(iconButton); } } revalidate(); repaint(); }
@Override public void actionPerformed(ActionEvent e) { List<RegisteredFrame> frames = frameRegistry.getInternalFrames(); for (RegisteredFrame frame : frames) { if (frame instanceof JInternalFrame && (group == null || frame.getGroup().equals(group))) { JInternalFrame internalF = ((JInternalFrame) frame); if (internalF.isIconifiable() && internalF.isIcon()) { try { internalF.setIcon(false); } catch (PropertyVetoException e1) { e1.printStackTrace(); } } } } } }
width += 16 + (frame.isClosable() ? 10 : 4); if (frame.isIconifiable()) { width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));
width += 16 + (frame.isClosable() ? 10 : 4); if (frame.isIconifiable()) { width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));
width += 16 + (frame.isClosable() ? 10 : 4); if (frame.isIconifiable()) { width += 16 + (frame.isMaximizable() ? 2 : (frame.isClosable() ? 10 : 4));
if (frame.isIconifiable()) r = iconButton.getBounds(); else if (frame.isMaximizable())
@ScriptFunction(jsDoc = MINIMIZE_JSDOC) public void minimize() { if (surface != null) { if (surface instanceof JFrame) { ((JFrame) surface).setExtendedState(JFrame.ICONIFIED); } else if (surface instanceof JInternalFrame) { JInternalFrame aFrame = (JInternalFrame) surface; try { if (aFrame.isMaximum()) { aFrame.setMaximum(false); } if (!aFrame.isIcon() && aFrame.isIconifiable()) { aFrame.setIcon(true); } } catch (Exception e) { } } } }
x += btnWidth + spacing; if (frame.isIconifiable() && !isPalette) { iconButton.setBounds(x, y, btnWidth, btnHeight); x += btnWidth + spacing;
x += spacing + btnWidth; if (frame.isIconifiable() && !isPalette) { iconButton.setBounds(x, y, btnWidth, btnHeight); x += spacing + btnWidth;
x += btnWidth + spacing; if (frame.isIconifiable() && !isPalette) { iconButton.setBounds(x, y, btnWidth, btnHeight); x += btnWidth + spacing;
if (frame.isIconifiable()) { x = center(iconButton, insets, x, true); if (frame.isIconifiable()) { x = center(iconButton, insets, x, false);
/** * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ public void actionPerformed(ActionEvent evt) { if (frame.isMaximizable() && frame.isMaximum() && frame.isIcon()) { try { frame.setIcon(false); } catch (PropertyVetoException e) { } } else if (frame.isMaximizable() && frame.isMaximum()) { try { frame.setMaximum(false); } catch (PropertyVetoException e) { } } else if (frame.isIconifiable() && frame.isIcon()) { try { frame.setIcon(false); } catch (PropertyVetoException e) { } } } }
if (!frame.isIconifiable()) throw new ActionFailedException("The given JInternalFrame (" + toString(frame) + ") is not "