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 (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 } }
private void maximizeMenuItemActionPerformed( ActionEvent evt) { try { for (JInternalFrame sf : getAllFrames()) { if (sf != null) { sf.setIcon(false); sf.setMaximum(true); } } } catch (Exception ex) { LOGGER.error("maximizeMenuItemActionPerformed", ex); // do nothing } }
/** * Sets the Icon attribute of the InternalFrameWindow object * * @param b The new Icon value * @exception PropertyVetoException Description of Exception */ public void setIcon(boolean b) throws PropertyVetoException { frame.setIcon(b); }
public void run() { try { frame.setIcon(b); } catch(PropertyVetoException e) { veto.e = e; } } });
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) {} } } } });
public void minimizeFrames() { JInternalFrame[] array = getAllFrames(); for (JInternalFrame element : array) { try { element.setIcon(true); } catch (PropertyVetoException pve) { } } }
public void restoreFrames() { JInternalFrame[] array = getAllFrames(); for (JInternalFrame element : array) { try { element.setIcon(false); } catch (PropertyVetoException pve) { } } }
private void iconify(String identifier, boolean shouldIconify) { try { ((JInternalFrame) createOperator(identifier).getSource()) .setIcon(shouldIconify); } catch (PropertyVetoException e) { throw new RuntimeException(e); } }
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); }
/** * Sets the focus of the passed network, if possible The Network ID * corresponds to the CyNetworkView.getNetwork().getIdentifier() */ protected void setFocus(String network_id) { if (networkViewMap.containsKey(network_id)) { try { networkViewMap.get(network_id).setIcon(false); networkViewMap.get(network_id).show(); // fires internalFrameActivated networkViewMap.get(network_id).setSelected(true); } catch (Exception e) { logger.warn("Network View unable to be focused"); } } }
@RunsInEDT static void setMaximum(final @Nonnull JInternalFrame internalFrame, final @Nonnull JInternalFrameAction action) { execute(() -> { internalFrame.setIcon(false); internalFrame.setMaximum(action.value); }); }
@RunsInEDT static void setIcon(final @Nonnull JInternalFrame internalFrame, final @Nonnull JInternalFrameAction action) { execute(() -> { internalFrame.setMaximum(false); internalFrame.setIcon(action.value); }); }
@ScriptFunction(jsDoc = TO_FRONT_JSDOC) public void toFront() { if (surface != null) { if (surface instanceof JInternalFrame) { try { ((JInternalFrame) surface).setIcon(false); } catch (Exception e) { } ((JInternalFrame) surface).toFront(); } else if (surface instanceof JFrame) { ((JFrame) surface).toFront(); } } } private static final String GET_MINIMIZED_JSDOC = ""
@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(); } } } } }
@ScriptFunction(jsDoc = MINIMIZE_ALL_JSDOC) public void minimizeAll() throws PropertyVetoException { for (JInternalFrame f : getAllFrames()) { if (f.isIconifiable() && !f.isIcon()) { f.setIcon(true); } } }
@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); } } }