Example usage for Java javax.swing SwingUtilities fields, constructors, methods, implement or subclass
The text is from its open source code.
Rectangle[] | computeDifference(Rectangle rectA, Rectangle rectB) Convenience returning an array of rect representing the regions within rectA that do not overlap with rectB . |
Rectangle | computeIntersection(int x, int y, int width, int height, Rectangle dest) Convenience to calculate the intersection of two rectangles without allocating a new rectangle. |
int | computeStringWidth(FontMetrics fm, String str) Compute the width of the string using a font with the specified "metrics" (sizes). |
MouseEvent | convertMouseEvent(Component source, MouseEvent sourceEvent, Component destination) Returns a MouseEvent similar to sourceEvent except that its x and y members have been converted to destination 's coordinate system. |
Point | convertPoint(Component source, Point aPoint, Component destination) Convert a aPoint in source coordinate system to destination coordinate system. |
Point | convertPoint(Component source, int x, int y, Component destination) Convert the point (x,y) in source coordinate system to destination coordinate system. |
void | convertPointFromScreen(Point p, Component c) Convert a point from a screen coordinates to a component's coordinate system |
void | convertPointToScreen(Point p, Component c) Convert a point from a component's coordinate system to screen coordinates. |
Rectangle | convertRectangle(Component source, Rectangle aRectangle, Component destination) Convert the rectangle aRectangle in source coordinate system to destination coordinate system. |
Container | getAncestorOfClass(Class> c, Component comp) Convenience method for searching above comp in the component hierarchy and returns the first object of class c it finds. |
Component | getDeepestComponentAt(Component parent, int x, int y) Returns the deepest visible descendent Component of parent that contains the location x , y . |
Rectangle | getLocalBounds(Component aComponent) Return the rectangle (0,0,bounds.width,bounds.height) for the component aComponent |
Component | getRoot(Component c) Returns the root component for the current component tree. |
JRootPane | getRootPane(Component c) If c is a JRootPane descendant return its JRootPane ancestor. |
ActionMap | getUIActionMap(JComponent component) Returns the ActionMap provided by the UI in component component . |
InputMap | getUIInputMap(JComponent component, int condition) Returns the InputMap provided by the UI for condition condition in component component . |
Container | getUnwrappedParent(Component component) Returns the first ancestor of the component which is not an instance of JLayer . |
Component | getUnwrappedView(JViewport viewport) Returns the first JViewport 's descendant which is not an instance of JLayer . |
Window | getWindowAncestor(Component c) Returns the first Window ancestor of c , or null if c is not contained inside a Window . |
void | invokeAndWait(final Runnable doRun) Causes doRun.run() to be executed synchronously on the AWT event dispatching thread. |
void | invokeLater(Runnable doRun) Causes doRun.run() to be executed asynchronously on the AWT event dispatching thread. |
boolean | isDescendingFrom(Component a, Component b) Return true if a component a descends from a component b |
boolean | isEventDispatchThread() Returns true if the current thread is an AWT event dispatching thread. |
boolean | isLeftMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the left mouse button. |
boolean | isMiddleMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the middle mouse button. |
boolean | isRightMouseButton(MouseEvent anEvent) Returns true if the mouse event specifies the right mouse button. |
String | layoutCompoundLabel(JComponent c, FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string. |
String | layoutCompoundLabel(FontMetrics fm, String text, Icon icon, int verticalAlignment, int horizontalAlignment, int verticalTextPosition, int horizontalTextPosition, Rectangle viewR, Rectangle iconR, Rectangle textR, int textIconGap) Compute and return the location of the icons origin, the location of origin of the text baseline, and a possibly clipped version of the compound labels string. |
void | paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) Paints a component to the specified Graphics . |
void | paintComponent(Graphics g, Component c, Container p, Rectangle r) Paints a component to the specified Graphics . |
void | replaceUIActionMap(JComponent component, ActionMap uiActionMap) Convenience method to change the UI ActionMap for component to uiActionMap . |
void | replaceUIInputMap(JComponent component, int type, InputMap uiInputMap) Convenience method to change the UI InputMap for component to uiInputMap . |
void | updateComponentTreeUI(Component c) A simple minded look and feel change: ask each node in the tree to updateUI() -- that is, to initialize its UI property with the current look and feel. |
Window | windowForComponent(Component c) Returns the first Window ancestor of c , or null if c is not contained inside a Window . |