@Override public void windowDeactivated(WindowEvent e) { if (root != null) { root.repaint(); } } };
@Override public void windowActivated(WindowEvent e) { if (root != null) { root.repaint(); } }
/** * Updates state dependant upon the Window's active state. * * @param isActive * if <code>true</code>, the window is in active state. */ private void setActive(boolean isActive) { this.getRootPane().repaint(); }
public void valueChanged(TreeSelectionEvent e) { getRootPane().repaint(); // repaints our glass-pane }
/** * Sets the original glass pane. * * @param dte * DropTargetEvent to get the tree */ private void setOriginalGlassPane(JTree tree) { JRootPane rootPane = tree.getRootPane(); rootPane.setGlassPane(originalGlassPane); originalGlassPane.setVisible(false); rootPane.repaint(); }
/** * Sets the original glass pane. * * @param dte * DropTargetEvent to get the tree */ private void setOriginalGlassPane(JTree tree) { JRootPane rootPane = tree.getRootPane(); rootPane.setGlassPane(originalGlassPane); originalGlassPane.setVisible(false); rootPane.repaint(); }
public <T> void load(List<T> list, Runnable runnable) { this.removeAll(); this.gridLayout.setRows(Math.max(list.size() / COLUMNS, 2)); runnable.run(); if (list.size() < COLUMNS * 2) { for (int i = 0; i < COLUMNS * 2 - list.size(); i++) { JPanel placeholder = new JPanel(); placeholder.setOpaque(false); this.add(placeholder); } } this.getRootPane().repaint(); } }
public void mouseReleased(MouseEvent ev) { if (dragCursor != 0 && window != null && !window.isValid()) { // Some Window systems validate as you resize, others won't, // thus the check for validity before repainting. window.validate(); getRootPane().repaint(); } isMovingWindow = false; dragCursor = 0; }
/** * Updates state dependant upon the Window's active state. * * @param isActive * if <code>true</code>, the window is in active state. */ void setActive(boolean isActive) { if (getRootPane() != null) { this.getRootPane().repaint(); } }
public void mouseReleased(MouseEvent ev) { if (dragCursor != 0 && window != null && !window.isValid()) { // Some Window systems validate as you resize, others won't, // thus the check for validity before repainting. window.validate(); getRootPane().repaint(); } isMovingWindow = false; dragCursor = 0; }
/** * Updates state dependant upon the Window's active state. * * @param isActive * if <code>true</code>, the window is in active state. */ public void setActive(boolean isActive) { if (getRootPane() != null) { this.getRootPane().repaint(); } }
public void mouseReleased(MouseEvent ev) { if (dragCursor != 0 && window != null && !window.isValid()) { // Some Window systems validate as you resize, others won't, // thus the check for validity before repainting. window.validate(); getRootPane().repaint(); } isMovingWindow = false; dragCursor = 0; }
/** * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent) */ public void mouseReleased(MouseEvent ev) { if (dragCursor != 0 && window != null && !window.isValid()) { // Some Window systems validate as you resize, others won't, // thus the check for validity before repainting. window.validate(); getRootPane().repaint(); } isMovingWindow = false; dragCursor = 0; }
public void mouseReleased(MouseEvent ev) { if ((this.dragCursor != 0) && (SubstanceRootPaneUI.this.window != null) && !SubstanceRootPaneUI.this.window.isValid()) { // Some Window systems validate as you resize, others won't, // thus the check for validity before repainting. SubstanceRootPaneUI.this.window.validate(); SubstanceRootPaneUI.this.getRootPane().repaint(); } this.isMovingWindow = false; this.dragCursor = 0; }
@Override public void mouseReleased(MouseEvent ev) { if ((this.dragCursor != 0) && (SubstanceRootPaneUI.this.window != null) && !SubstanceRootPaneUI.this.window.isValid()) { // Some Window systems validate as you resize, others won't, // thus the check for validity before repainting. SubstanceRootPaneUI.this.window.validate(); SubstanceRootPaneUI.this.getRootPane().repaint(); } this.isMovingWindow = false; this.dragCursor = 0; }
protected void setActive(boolean flag) { if (getWindowDecorationStyle() == BaseRootPaneUI.FRAME) { Boolean active = flag ? Boolean.TRUE : Boolean.FALSE; iconifyButton.putClientProperty(PAINT_ACTIVE, active); closeButton.putClientProperty(PAINT_ACTIVE, active); maxButton.putClientProperty(PAINT_ACTIVE, active); } getRootPane().repaint(); }
/** Updates state dependant upon the Window's active state. */ private void setActive(boolean isActive) { Boolean activeB = isActive ? Boolean.TRUE : Boolean.FALSE; closeButton.putClientProperty("paintActive", activeB); if (getWindowDecorationStyle() == JRootPane.FRAME) { iconifyButton.putClientProperty("paintActive", activeB); toggleButton.putClientProperty("paintActive", activeB); } // Repaint the whole thing as the Borders that are used have // different colors for active vs inactive getRootPane().repaint(); }
/** * Installs the necessary state onto the root pane to render client * decorations. This is <em>only</em> invoked if the root pane has a * decoration style other than <tt>JRootPane.NONE</tt>. */ private void installClientDecorations(JRootPane rootPane) { installBorder(rootPane); setTitlePane(rootPane, createTitlePane(rootPane)); installWindowListeners(rootPane.getParent()); installLayout(rootPane); if (window != null) { rootPane.revalidate(); rootPane.repaint(); } }
public void uninstallClientDecorations(JRootPane root) { uninstallBorder(root); uninstallWindowListeners(root); setTitlePane(root, null); uninstallLayout(root); int style = DecorationHelper.getWindowDecorationStyle(root); if (style == NONE) { root.repaint(); root.revalidate(); } // Reset the cursor, as we may have changed it to a resize cursor if (window != null) { window.setCursor(savedCursor); } window = null; }
public void installClientDecorations(JRootPane root) { installBorder(root); if (titlePane == null) { setTitlePane(root, createTitlePane(root)); } installWindowListeners(root, root.getParent()); installLayout(root); if (window != null) { savedCursor = window.getCursor(); root.revalidate(); root.repaint(); } }