public void actionPerformed(final ActionEvent e) { final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames(); final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager(); for (int i=0; i<frames.length; i++) { final JInternalFrame frame = frames[i]; desktopManager.deiconifyFrame(frame); try { frame.setMaximum(false); } catch (PropertyVetoException e1) { e1.printStackTrace(); } final int height = gcViewer.getDesktopPane().getHeight()/frames.length; desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height); } } }
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 } }
for (JInternalFrame sf : getAllFrames()) { if (sf != null && !sf.isIcon()) { sf.setMaximum(false); sf.moveToFront(); if (x >= desktopW
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 run() { try { frame.setMaximum(b); } catch(PropertyVetoException e) { veto.e = e; } } });
/** * Sets the Maximum attribute of the InternalFrameWindow object * * @param b The new Maximum value * @exception PropertyVetoException Description of Exception */ public void setMaximum(boolean b) throws PropertyVetoException { frame.setMaximum(b); }
schemaFrame, javax.swing.JLayeredPane.DEFAULT_LAYER); schemaFrame.show(); schemaFrame.setMaximum(true);
JInternalFrame frame = ... frame..setMaximum(true); // Maximize this window to fill up the whole desktop area
private void maximize(String identifier, boolean shouldMaximize) { try { ((JInternalFrame) createOperator(identifier).getSource()) .setMaximum(shouldMaximize); } catch (PropertyVetoException e) { throw new RuntimeException(e); } }
@Override public void actionPerformed(ActionEvent e) { TabData tab = tabbedContainer.getModel().getTab(tabIndex); JInternalFrame internalFrame = tabToFrameMap.get(tab); try { internalFrame.setMaximum(true); } catch (PropertyVetoException e1) { // ok } } }
@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); }); }
public void moveFrame() { JInternalFrame selectedFrame = desktopPane.getSelectedFrame(); Dimension currentSize = selectedFrame.getSize(); try { selectedFrame.setMaximum(false); } catch (PropertyVetoException ex) { ex.printStackTrace(); } selectedFrame.setSize(currentSize); desktopPane.remove(selectedFrame); desktopPane.repaint(); secondFrame.addInternalFrame(selectedFrame); }
@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); } } }
@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); } } }
public void tileFramesVertically() { Component[] allFrames = getAllFrames(); // do nothing if no frames to work with if (allFrames.length == 0) { return; } manager.setNormalSize(); int frameWidth = getBounds().width/allFrames.length; int x = 0; for (int i = 0; i < allFrames.length; i++) { try { ((JInternalFrame)allFrames[i]).setMaximum(false); } catch (PropertyVetoException e) { e.printStackTrace(); } allFrames[i].setBounds(x, 0, frameWidth, getBounds().height); x = x + frameWidth; } checkDesktopSize(); }
public void tileFramesHorizontally() { Component[] allFrames = getAllFrames(); // do nothing if no frames to work with if (allFrames.length == 0) { return; } manager.setNormalSize(); int frameHeight = getBounds().height/allFrames.length; int y = 0; for (int i = 0; i < allFrames.length; i++) { try { ((JInternalFrame)allFrames[i]).setMaximum(false); } catch (PropertyVetoException e) { e.printStackTrace(); } allFrames[i].setBounds(0, y, getBounds().width,frameHeight); y = y + frameHeight; } checkDesktopSize(); }
public void tileFramesVertically() { Component[] allFrames = getAllFrames(); // do nothing if no frames to work with if (allFrames.length == 0) { return; } manager.setNormalSize(); int frameWidth = getBounds().width/allFrames.length; int x = 0; for (int i = 0; i < allFrames.length; i++) { try { ((JInternalFrame)allFrames[i]).setMaximum(false); } catch (PropertyVetoException e) { e.printStackTrace(); } allFrames[i].setBounds(x, 0, frameWidth, getBounds().height); x = x + frameWidth; } checkDesktopSize(); }
@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) { } } } }
public void actionPerformed(final ActionEvent e) { final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames(); final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager(); for (int i=0; i<frames.length; i++) { final JInternalFrame frame = frames[i]; desktopManager.deiconifyFrame(frame); try { frame.setMaximum(false); } catch (PropertyVetoException e1) { e1.printStackTrace(); } final int height = gcViewer.getDesktopPane().getHeight()/frames.length; desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height); } } }