Available Methods
- putClientProperty ( )
- getClientProperty ( )
- add ( )
- setBorder ( )
- getHeight ( )
- setOpaque ( )
- setEnabled ( )
- getBorder ( )
- getWidth ( )
- setForeground ( )
- setBackground ( )
- isEnabled ( )
- getInsets ( )
- isOpaque ( )
- getParent ( )
- setToolTipText ( )
- setFont ( )
- removeMouseListener ( )
- getPreferredSize ( )
- getActionMap ( )
- setBounds ( )
- setMaximumSize ( )
- setPreferredSize ( )
- getComponents ( )
- getBackground ( )
- setLayout ( )
- setCursor ( )
- addMouseListener ( )
- paint ( )
- isVisible ( )
- getName ( )
- getFontMetrics ( )
- removeAll ( )
- repaint ( )
- addMouseMotionListener ( )
- removeMouseMotionListener ( )
- setAlignmentX ( )
- setInheritsPopupMenu ( )
- removeFocusListener ( )
- setVisible ( )
- getInputMap ( )
- removePropertyChangeListener ( )
- print ( )
- addFocusListener ( )
- setMinimumSize ( )
- isShowing ( )
- addPropertyChangeListener ( )
- getComponentCount ( )
- addKeyListener ( )
- revalidate ( )
- getComponent ( )
- getSize ( )
- getMaximumSize ( )
- getFont ( )
- getTransferHandler ( )
- getMinimumSize ( )
- getLocationOnScreen ( )
- getVisibleRect ( )
- setAutoscrolls ( )
- setFocusable ( )
- doLayout ( )
- addMouseWheelListener ( )
- getBounds ( )
- setSize ( )
- removeKeyListener ( )
- setFocusTraversalKeys ( )
- addHierarchyListener ( )
- removeMouseWheelListener ( )
- invalidate ( )
- addComponentListener ( )
- inside ( )
- AccessibleJComponent ( )
- hasFocus ( )
- remove ( )
- getTreeLock ( )
- setDoubleBuffered ( )
- setDefaultLocale ( )
- getLayout ( )
- requestFocus ( )
- WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
- getAutoscrolls ( )
- getToolTipLocation ( )
Related Classes
- java.io.File
- java.util.logging.Level
- java.awt.image.BufferedImage
- java.awt.Color
- java.awt.event.ActionEvent
- java.awt.event.ActionListener
- javax.swing.JPanel
- java.awt.Dimension
- javax.swing.JFrame
- java.awt.Font
- java.awt.event.MouseEvent
- javax.swing.JLabel
- java.awt.Graphics2D
- java.awt.Graphics
- javax.swing.JButton
- java.awt.event.KeyEvent
- java.awt.BorderLayout
- java.awt.Component
- javax.swing.JScrollPane
- java.awt.event.WindowEvent
- java.awt.Rectangle
- javax.swing.JTextField
- javax.swing.SwingUtilities
- java.awt.event.MouseAdapter
- javax.swing.ImageIcon
Java Code Examples for javax.swing.JComponent#getTreeLock()
The following examples show how to use
javax.swing.JComponent#getTreeLock() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UIUtilities.java From gcs with Mozilla Public License 2.0 | 6 votes |
/** * @param component The component to generate an image of. * @return The newly created image. */ public static Img getImage(JComponent component) { Img offscreen = null; synchronized (component.getTreeLock()) { Graphics2D gc = null; try { Rectangle bounds = component.getVisibleRect(); offscreen = Img.create(component.getGraphicsConfiguration(), bounds.width, bounds.height, Transparency.TRANSLUCENT); gc = offscreen.getGraphics(); gc.translate(-bounds.x, -bounds.y); component.paint(gc); } catch (Exception exception) { Log.error(exception); } finally { if (gc != null) { gc.dispose(); } } } return offscreen; }
Example 2
Source File: AnimatedLayout.java From pumpernickel with MIT License | 5 votes |
protected void layoutContainerImmediately(JComponent parent) { synchronized (parent.getTreeLock()) { Map<JComponent, Rectangle> destMap = getDestinationMap(parent); for (Entry<JComponent, Rectangle> entry : destMap.entrySet()) { entry.getKey().setBounds(entry.getValue()); } } parent.repaint(); }
Example 3
Source File: FreeColDialog.java From freecol with GNU General Public License v2.0 | 4 votes |
public static void setSubcomponentsNotOpaque(JComponent j) { synchronized(j.getTreeLock()) { iterateOverOpaqueLayersComponents(j); } }