public class StudioUtilities extends Object implements SwingConstants
| Modifier and Type | Field and Description |
|---|---|
protected static editor.search.StudioUtilities.ClipCursorHandler |
g_clipCursorListener |
protected static Rectangle |
g_rcClipCursor |
protected static Robot |
g_robot |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Modifier and Type | Method and Description |
|---|---|
static Dimension |
boundDimensionWithin(Dimension preferredSize,
Dimension minimumSize,
Dimension maxSize) |
static void |
centerWindowInFrame(Component window,
Window frame) |
static void |
clipCursor(Rectangle rcScreen) |
static boolean |
clipPoint(Point pt) |
static boolean |
containsFocus(Component c) |
static void |
convertRectangleToScreen(Rectangle rectangle,
Component component) |
static void |
doWaitOperation(Runnable op) |
static void |
drawStringInRect(Graphics g,
String strText,
int x,
int y,
int width,
int height,
int justification,
boolean bClip) |
static void |
drawStringInRect(Graphics g,
String strText,
Rectangle rc,
int justification,
boolean bClip) |
static Rectangle |
drawStringInRectClipped(Graphics g,
FontMetrics fm,
String strText,
Rectangle rcClip,
int iHorzAlign,
int iVertAlign,
boolean bReturnBounds) |
static Rectangle |
drawStringInRectClipped(Graphics g,
String strText,
Rectangle rcClip,
int iHorzAlign,
int iVertAlign) |
static Vector<String> |
drawTextWrapped(Graphics g,
Rectangle rect,
String strText) |
static Vector<String> |
drawTextWrapped(Graphics g,
Rectangle rect,
String strText,
Font font,
int iLineLengthChars,
boolean bClip,
boolean bAppendLineFeed) |
static void |
enableComponent(Component c,
boolean bEnabled) |
static void |
ensureWindowIsVisible(Window w) |
static List<String> |
filterStrings(Collection<? extends CharSequence> collection,
String filter) |
static List<String> |
filterStrings(Collection<? extends CharSequence> collection,
String filter,
boolean showChoicesIfEmpty) |
static <T> T |
findAncestor(Component start,
Class<T> aClass)
Finds the first widget above the passed in widget of the given class
|
static <T> T |
findAtOrAbove(Component start,
Class<T> aClass)
Finds the first widget at or above the passed in widget of the given class
|
static boolean |
focusContains(Component c) |
static Frame |
frameForComponent(Component comp) |
static Window |
getActiveWindow() |
static Component |
getFocus() |
static Window |
getFocusedWindow() |
static Rectangle |
getPrimaryMonitorScreenRect() |
static Robot |
getRobot() |
static Point |
getXYForDialogRelativeToStudioFrame(int width,
int height) |
static void |
hideToolTip(JComponent c) |
static void |
htmlEncode(StringBuilder sb) |
static void |
invalidateTree(Component component) |
static void |
invokeInDispatchThread(Runnable task) |
static void |
invokeNowOrLater(Runnable task) |
static boolean |
isInFocusLineage(Component c) |
static void |
mapCancelKeystroke(JDialog dialog,
Action cancelAction) |
static void |
removePopupBorder(Container c) |
static JRootPane |
rootPaneForComponent(Component comp) |
static boolean |
shouldPaint(Graphics g,
Component comp) |
static boolean |
shouldPaint(Graphics g,
int x,
int y,
int iWidth,
int iHeight) |
static Component |
showWaitCursor(boolean bWait) |
static void |
showWaitCursor(boolean bWait,
Component c) |
static Window |
windowForComponent(Component comp) |
static String |
wrapText(String strText) |
static String |
wrapText(String strText,
int iLineLen) |
protected static Rectangle g_rcClipCursor
protected static editor.search.StudioUtilities.ClipCursorHandler g_clipCursorListener
protected static Robot g_robot
public static void enableComponent(Component c, boolean bEnabled)
public static Component getFocus()
public static Window getFocusedWindow()
public static Window getActiveWindow()
public static boolean containsFocus(Component c)
public static boolean focusContains(Component c)
public static boolean isInFocusLineage(Component c)
public static void removePopupBorder(Container c)
public static JRootPane rootPaneForComponent(Component comp)
comp - the component to analyzepublic static Component showWaitCursor(boolean bWait)
public static void showWaitCursor(boolean bWait,
Component c)
public static void doWaitOperation(Runnable op)
public static void invokeInDispatchThread(Runnable task)
public static void invokeNowOrLater(Runnable task)
public static Rectangle drawStringInRectClipped(Graphics g, String strText, Rectangle rcClip, int iHorzAlign, int iVertAlign)
public static Rectangle drawStringInRectClipped(Graphics g, FontMetrics fm, String strText, Rectangle rcClip, int iHorzAlign, int iVertAlign, boolean bReturnBounds)
public static void drawStringInRect(Graphics g, String strText, Rectangle rc, int justification, boolean bClip)
public static void drawStringInRect(Graphics g, String strText, int x, int y, int width, int height, int justification, boolean bClip)
public static boolean shouldPaint(Graphics g, int x, int y, int iWidth, int iHeight)
public static Vector<String> drawTextWrapped(Graphics g, Rectangle rect, String strText)
public static Vector<String> drawTextWrapped(Graphics g, Rectangle rect, String strText, Font font, int iLineLengthChars, boolean bClip, boolean bAppendLineFeed)
public static Robot getRobot()
public static void clipCursor(Rectangle rcScreen)
public static boolean clipPoint(Point pt)
public static Dimension boundDimensionWithin(Dimension preferredSize, Dimension minimumSize, Dimension maxSize)
public static void invalidateTree(Component component)
public static <T> T findAncestor(Component start, Class<T> aClass)
start - the start componentaClass - the class to findpublic static <T> T findAtOrAbove(Component start, Class<T> aClass)
start - the start componentaClass - the class to findpublic static void ensureWindowIsVisible(Window w)
public static void hideToolTip(JComponent c)
public static void convertRectangleToScreen(Rectangle rectangle, Component component)
public static Rectangle getPrimaryMonitorScreenRect()
public static Point getXYForDialogRelativeToStudioFrame(int width, int height)
public static List<String> filterStrings(Collection<? extends CharSequence> collection, String filter)
public static List<String> filterStrings(Collection<? extends CharSequence> collection, String filter, boolean showChoicesIfEmpty)
public static void htmlEncode(StringBuilder sb)
Copyright © 2022. All rights reserved.