| java.lang.Object org.netbeans.modules.visualweb.designer.DesignerUtils
DesignerUtils | public class DesignerUtils (Code) | | Miscellaneous utilities for the designer
author: Tor Norbye |
Field Summary | |
final static boolean | DEBUG Debugging flag. |
Method Summary | |
static void | debugLog(String message) Logs debug message. | public static FontMetrics | getFontMetrics(Font font) XXX To keep the deprecated Toolkit.getFrontMetrics method separated.
/* TODO Find out how actually is one suppose replace the Toolkit.getFontMetrics method. | final public static int | getNonTabbedTextWidth(char[] s, int beginOffset, int endOffset, FontMetrics metrics) | final public static boolean | inside(int x, int y, int tx, int ty, int w, int h) Check to see if the given point is inside of the rectangle
positioned at (tx,ty) of dimensions (w,h). | public static boolean | intersects(Rectangle r, int rx, int ry, int rw, int rh) Taken from java.awt.Rectangle; changed to be static and
to compare with specified x,y,w,h instead of another Rectangle
Determines whether or not this Rectangle and the specified
Rectangle intersect. | public static boolean | onlyWhitespace(String s) XXX Copy also in insync/FacesDnDSupport. | public static void | setActivatedNodes(TopComponent tc, org.openide.nodes.Node[] nodes) Thread-safe method to set the activated nodes of a TopComponent;
this can only be done from the event dispatch thread. |
DEBUG | final static boolean DEBUG(Code) | | Debugging flag.
|
debugLog | static void debugLog(String message)(Code) | | Logs debug message. Use only after checking DEBUG flag.
|
getFontMetrics | public static FontMetrics getFontMetrics(Font font)(Code) | | XXX To keep the deprecated Toolkit.getFrontMetrics method separated.
/* TODO Find out how actually is one suppose replace the Toolkit.getFontMetrics method.
|
getNonTabbedTextWidth | final public static int getNonTabbedTextWidth(char[] s, int beginOffset, int endOffset, FontMetrics metrics)(Code) | | Based on similar routine in javax.swing.text.Utilities
|
inside | final public static boolean inside(int x, int y, int tx, int ty, int w, int h)(Code) | | Check to see if the given point is inside of the rectangle
positioned at (tx,ty) of dimensions (w,h).
|
intersects | public static boolean intersects(Rectangle r, int rx, int ry, int rw, int rh)(Code) | | Taken from java.awt.Rectangle; changed to be static and
to compare with specified x,y,w,h instead of another Rectangle
Determines whether or not this Rectangle and the specified
Rectangle intersect. Two rectangles intersect if
their intersection is nonempty.
Parameters: r - the specified Rectangle true if the specified Rectangle and this Rectangle intersect;false otherwise. |
onlyWhitespace | public static boolean onlyWhitespace(String s)(Code) | | XXX Copy also in insync/FacesDnDSupport.
Return true iff the string contains only whitespace
|
setActivatedNodes | public static void setActivatedNodes(TopComponent tc, org.openide.nodes.Node[] nodes)(Code) | | Thread-safe method to set the activated nodes of a TopComponent;
this can only be done from the event dispatch thread. If called
from another thread it will post a runnable on the event dispatch
thread instead.
|
|
|