public void actionPerformed(ActionEvent evt) { try { if (jf.isIcon()) { jf.setIcon(false); } else { jf.setSelected(true); } } catch (Exception ex) { LOGGER.error("queryMenuItem", ex); } } });
@ScriptFunction(jsDoc = MINIMIZE_ALL_JSDOC) public void minimizeAll() throws PropertyVetoException { for (JInternalFrame f : getAllFrames()) { if (f.isIconifiable() && !f.isIcon()) { f.setIcon(true); } } }
public void actionPerformed(ActionEvent evt) { try { if (jf.isIcon()) { jf.setIcon(false); } else { jf.setSelected(true); } } catch (Exception ex) { LOGGER.error("queryMenuItem", ex); } } });
public void actionPerformed(ActionEvent evt) { try { if (schemaFrame.isIcon()) { schemaFrame.setIcon(false); } else { schemaFrame.setSelected(true); } } catch (Exception ex) { LOGGER.error("schemaMenuItem", ex); } } });
private void minimizeMenuItemActionPerformed( ActionEvent evt) { try { for (JInternalFrame sf : getAllFrames()) { if (sf != null && !sf.isIcon()) { sf.setIcon(true); } } } catch (Exception ex) { LOGGER.error("minimizeMenuItemActionPerformed", ex); // do nothing } }
int x = 0, y = 0; for (JInternalFrame sf : getAllFrames()) { if (sf != null && !sf.isIcon()) { sf.setMaximum(false); sf.moveToFront();
private void cascadeMenuItemActionPerformed( ActionEvent evt) { try { int sfi = 1; for (JInternalFrame sf : getAllFrames()) { if (sf != null && !sf.isIcon()) { sf.setMaximum(false); sf.setLocation(30 * sfi, 30 * sfi); sf.moveToFront(); sf.setSelected(true); sfi++; } } } catch (Exception ex) { LOGGER.error("cascadeMenuItemActionPerformed", ex); // do nothing } }
public void propertyChange(PropertyChangeEvent _evt) { if (Boolean.TRUE.equals(_evt.getNewValue()) && "selected".equals(_evt.getPropertyName())) { final JInternalFrame fintern = (JInternalFrame) _evt.getSource(); if (fintern.isIcon()) { try { fintern.setIcon(false); } catch (PropertyVetoException ex) {} } } } });
@Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getSource() instanceof JInternalFrame && JInternalFrame.IS_MAXIMUM_PROPERTY.equals(evt.getPropertyName())) { JInternalFrame source = (JInternalFrame) evt.getSource(); if (Boolean.FALSE.equals(evt.getOldValue()) && Boolean.TRUE.equals(evt.getNewValue())) { executeEvent(windowMaximized, evt); } else if (Boolean.TRUE.equals(evt.getOldValue()) && Boolean.FALSE.equals(evt.getNewValue()) && !source.isIcon()) { executeEvent(windowRestored, evt); } } } }
public void setIconified(boolean iconified) { boolean old = internalFrame.isIcon(); if (old == iconified) return; try { internalFrame.setIcon(iconified); } catch (PropertyVetoException e) { throw new RuntimeException(e); } firePropertyChangeEvent("iconified", old, iconified); }
@RunsInCurrentThread private static void checkShowingOrIconified(@Nonnull JInternalFrame internalFrame) { if (!internalFrame.isIcon()) { checkShowing(internalFrame); } }
@RunsInCurrentThread static boolean isIconified(@Nonnull JInternalFrame frame) { if (frame.isMaximum()) { return false; } return frame.isIcon(); }
@Override protected void enableActions() { super.enableActions(); if (!this.frame.isIcon()) { if (this.maxButton != null) this.maxButton.setEnabled(this.maximizeAction.isEnabled() || this.restoreAction.isEnabled()); if (this.iconButton != null) this.iconButton.setEnabled(this.iconifyAction.isEnabled()); } }
@Override protected void enableActions() { super.enableActions(); if (!this.frame.isIcon()) { if (this.maxButton != null) this.maxButton.setEnabled(this.maximizeAction.isEnabled() || this.restoreAction.isEnabled()); if (this.iconButton != null) this.iconButton.setEnabled(this.iconifyAction.isEnabled()); } }
@Override public void removeNotify() { super.removeNotify(); // fix for defect 211 - internal frames that are iconified // programmatically should not uninstall the title panes. boolean isAlive = ((this.frame.isIcon() && !this.frame.isClosed()) || Boolean.TRUE .equals(frame.getClientProperty(ICONIFYING))); if (!isAlive) { this.uninstall(); } }
@RunsInCurrentThread @Nonnull private static Pair<Container, Point> findMaximizeLocation(@Nonnull JInternalFrame internalFrame) { Container clickTarget = internalFrame.isIcon() ? internalFrame.getDesktopIcon() : internalFrame; Point location = maximizeButtonLocation(checkNotNull(clickTarget)); return Pair.of(clickTarget, location); }
@Override public void removeNotify() { super.removeNotify(); // fix for defect 211 - internal frames that are iconified // programmatically should not uninstall the title panes. boolean isAlive = ((this.frame.isIcon() && !this.frame.isClosed()) || Boolean.TRUE .equals(frame.getClientProperty(ICONIFYING))); if (!isAlive) { this.uninstall(); } }
/** * Show the system menu. */ private void showSystemMenu() { Insets insets = frame.getInsets(); if (!frame.isIcon()) { systemPopupMenu.show(frame, insets.left, getY() + getHeight()); } else { systemPopupMenu.show(menuButton, getX() - insets.left - insets.right, getY() - systemPopupMenu.getPreferredSize().height - insets.bottom - insets.top); } }
@ScriptFunction(jsDoc = MAXIMIZE_ALL_JSDOC) public void maximizeAll() throws PropertyVetoException { for (JInternalFrame f : getAllFrames()) { if (f.isIcon()) { f.setIcon(false); } if (f.isMaximizable()) { f.setMaximum(true); } } }
@ScriptFunction(jsDoc = RESTORE_ALL_JSDOC) public void restoreAll() throws PropertyVetoException { for (JInternalFrame f : getAllFrames()) { if (f.isIcon()) { f.setIcon(false); } if (f.isMaximum()) { f.setMaximum(false); } } }