/** * Gets the Iconifiable attribute of the SkinWindowWindow object * * @return The Iconifiable value */ public boolean isIconifiable() { boolean toreturn = false; if (frame != null) toreturn = frame.isResizable(); return toreturn; }
/** * Is the parent window iconifiable? * * @return {@code true} if the parent window is iconifiable, {@code false} * otheriwes. */ private boolean isParentIconifiable() { if (rootParent instanceof JFrame) { return ((JFrame)rootParent).isResizable(); } return false; }
/** * Is the parent window maximizable? * * @return {@code true} if the parent window is maximizable, {@code false} * otheriwes. */ private boolean isParentMaximizable() { if (rootParent instanceof JFrame) { return ((JFrame)rootParent).isResizable(); } return false; }
/** * Gets the Maximizable attribute of the SkinWindowWindow object * * @return The Maximizable value */ public boolean isMaximizable() { boolean toreturn = false; if (frame != null) toreturn = frame.isResizable() && !isShaded(); return toreturn; }
/** * Gets the Resizable attribute of the SkinWindowWindow object * * @return The Resizable value */ public boolean isResizable() { boolean toreturn = false; if (frame != null) { toreturn = frame.isResizable(); } else if (dialog != null) { return dialog.isResizable() && !isShaded(); } return toreturn; }
public boolean isResizable(Component c) { boolean resizable = true; if (c instanceof JDialog) { JDialog dialog = (JDialog) c; resizable = dialog.isResizable(); } else if (c instanceof JInternalFrame) { JInternalFrame frame = (JInternalFrame) c; resizable = frame.isResizable(); } else if (c instanceof JRootPane) { JRootPane jp = (JRootPane) c; if (jp.getParent() instanceof JFrame) { JFrame frame = (JFrame) c.getParent(); resizable = frame.isResizable(); } else if (jp.getParent() instanceof JDialog) { JDialog dialog = (JDialog) c.getParent(); resizable = dialog.isResizable(); } } return resizable; }
if (!frame.isResizable()) { frame.setResizable(true); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
if (!frame.isResizable()) { frame.setResizable(true); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
if (!frame.isResizable()) { frame.setResizable(true); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
if (!frame.isResizable()) { frame.setResizable(true); frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
@Override public void saveProperties() { if(mapViewWindows == null) return; saveSplitPanePosition(); if (frame.isResizable()) { final int winState = frame.getExtendedState() & ~Frame.ICONIFIED; if (JFrame.MAXIMIZED_BOTH != (winState & JFrame.MAXIMIZED_BOTH)) { resourceController.setProperty("appwindow_x", String.valueOf(frame.getX())); resourceController.setProperty("appwindow_y", String.valueOf(frame.getY())); resourceController.setProperty("appwindow_width", String.valueOf(frame.getWidth())); resourceController.setProperty("appwindow_height", String.valueOf(frame.getHeight())); } resourceController.setProperty("appwindow_state", String.valueOf(winState)); } mapViewWindows.saveLayout(); resourceController.getLastOpenedList().saveProperties(); }
@Override protected void paintBackground(Graphics2D g, JXStatusBar bar) { this.bgDelegate.paint(bar, g, true); JRootPane rootPane = SwingUtilities.getRootPane(bar); Window window = SwingUtilities.getWindowAncestor(bar); boolean isResizable = false; if (window instanceof JFrame) { JFrame frame = (JFrame) window; isResizable = frame.isResizable() && (frame.getExtendedState() != JFrame.MAXIMIZED_BOTH); } if (window instanceof JDialog) { isResizable = ((JDialog) window).isResizable(); } boolean hasResizeGrip = SubstanceCoreUtilities .toShowExtraWidgets(rootPane) && isResizable; if (hasResizeGrip) { int dim = bar.getHeight() * 2 / 3; SubstanceColorScheme scheme = SubstanceColorSchemeUtilities .getColorScheme(bar, ColorSchemeAssociationKind.SEPARATOR, ComponentState.ENABLED); BufferedImage resizeImage = SubstanceImageCreator .getResizeGripImage(bar, scheme, dim, false); g.drawImage(resizeImage, bar.getWidth() - dim, bar.getHeight() - dim, null); } }