Warning
While this class is public, it should not be treated as public API and its API may change in incompatible ways between dot dot releases and even patch releases. You should not rely on this class even existing.
Modifier and Type | Class and Description |
---|---|
private static class | |
private static class | SwingUtilities2.
LSBCacheEntry is used to cache the left side bearing (lsb) for
a particular |
public static interface | SwingUtilities2.
Used to listen to "blit" repaints in RepaintManager. |
public static enum | SwingUtilities2.
Used by the |
Modifier and Type | Field and Description |
---|---|
private static final Object | |
public static final StringUIClientPropertyKey | BASICMENUITEMUI_MAX_TEXT_OFFSET
Client Property key for the text maximal offsets for BasicMenuItemUI |
private static final int | |
private static final int | |
private static char[] | |
private static final Object | |
public static final FontRenderContext | |
private static SwingUtilities2. | |
public static final String | IMPLIED_CR
Attribute key for the content elements. |
public static final Object | LAF_STATE_KEY
The |
private static final int | |
public static final Object | |
private static final int | |
private static int | |
private static SwingUtilities2. | |
private static final StringBuilder | SKIP_CLICK_COUNT
Used to tell a text component, being used as an editor for table or tree, how many clicks it took to start editing. |
private static final String |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public static void | adjustFocus(JComponent c)
Request focus on the given component if it doesn't already have it
and |
public static boolean | canAccessSystemClipboard()
checks the security permissions for accessing system clipboard for untrusted context (see isTrustedContext) checks the permissions for the current event being handled |
public static boolean | canCurrentEventAccessSystemClipboard()
Returns true if EventQueue.getCurrentEvent() has the permissions to access the system clipboard |
private static boolean | canCurrentEventAccessSystemClipboard(boolean
boolean checkGesture)Returns true if EventQueue.getCurrentEvent() has the permissions to access the system clipboard and if it is allowed gesture (if checkGesture true) |
public static boolean | canEventAccessSystemClipboard(AWTEvent
AWTEvent to check e)Returns true if the given event has permissions to access the system clipboard |
private static boolean | canEventAccessSystemClipboard(AWTEvent
AWTEvent to check e, boolean boolean checkGesture)Returns true if e has the permissions to access the system clipboard and if it is allowed gesture (if checkGesture is true) |
public static void | checkAccess(int
a set of modifiers modifiers)Utility method that throws SecurityException if SecurityManager is set and modifiers are not public |
public static String | Returns: Clipped string that can fit in the provided space.JComponent that will display the string, may be null c, FontMetrics FontMetrics used to measure the String width fm, String String to display string, int Amount of space that the string can be drawn in availTextWidth)Clips the passed in String to the space provided. |
public static String | Returns: Clipped string that can fit in the provided space.JComponent that will display the string, may be null c, FontMetrics FontMetrics used to measure the String width fm, String String to display string, int Amount of space that the string can be drawn in availTextWidth)Clips the passed in String to the space provided. |
public static Component | |
public static int | Returns: the index of the corresponding column in the modelthe table model cm, int the index of the column in the view viewColumnIndex)Maps the index of the column in the view at
|
public static int | Returns: the index of the corresponding column in the viewthe table model cm, int the index of the column in the model modelColumnIndex)Maps the index of the column in the |
private static TextLayout | |
public static String | |
public static int | drawChars(JComponent c, Graphics g, char[] data, int offset, int length, int x, int y)
The following draw functions have the same semantic as the Graphics methods with the same names. |
public static float | |
public static float | drawChars(JComponent c, Graphics g, char[] data, int offset, int length, float x, float y, boolean useFPAPI)
|
public static void | |
public static void | drawRect(Graphics
Graphics to draw the rectangle to. g, int the x coordinate of the rectangle to be drawn. x, int the y coordinate of the rectangle to be drawn. y, int the w of the rectangle to be drawn. w, int the h of the rectangle to be drawn. h)This method should be used for drawing a borders over a filled rectangle. |
public static void | drawString(JComponent
JComponent that will display the string, may be null c, Graphics Graphics to draw the text to g, String String to display text, int X coordinate to draw the text at x, int Y coordinate to draw the text at y)Draws the string at the specified location. |
public static void | drawString(JComponent
JComponent that will display the string, may be null c, Graphics Graphics to draw the text to g, String String to display text, float X coordinate to draw the text at x, float Y coordinate to draw the text at y, boolean use floating point API useFPAPI)Draws the string at the specified location. |
public static float | |
public static float | |
private static float | |
public static void | drawStringUnderlineCharAt(JComponent
JComponent that will display the string, may be null c, Graphics Graphics to draw the text to g, String String to display text, int Index of a character in the string to underline underlinedIndex, int X coordinate to draw the text at x, int Y coordinate to draw the text at y)Draws the string at the specified location underlining the specified character. |
public static void | drawStringUnderlineCharAt(JComponent
JComponent that will display the string, may be null c, Graphics Graphics to draw the text to g, String String to display text, int Index of a character in the string to underline underlinedIndex, float X coordinate to draw the text at x, float Y coordinate to draw the text at y, boolean use floating point API useFPAPI)Draws the string at the specified location underlining the specified character. |
public static void | |
private static void | |
public static int | getAdjustedClickCount(JTextComponent comp, MouseEvent e)
Return the MouseEvent's click count, possibly reduced by the value of
the component's |
public static Object | Returns: the previous antialiasing rendering hint value if the passed graphics is instance of Graphics2D, null otherwise.the graphics g)Enables the antialiasing rendering hint for the scaled graphics and returns the previous hint value. |
public static boolean | Returns: the boolean value of the client property if it is set or the L&F property in other case.the component component, String an key)String specifying the key for the desired boolean valueReturns the client property for the given key if it is set; otherwise returns the L&F; property. |
public static float | |
public static float | |
public static FontMetrics | getFontMetrics(JComponent
JComponent requesting FontMetrics, may be null c, Graphics Graphics Graphics g)Returns the FontMetrics for the current Font of the passed in Graphics. |
public static FontMetrics | getFontMetrics(JComponent
JComponent requesting FontMetrics, may be null c, Graphics Graphics g, Font Font to get FontMetrics for font)Returns the FontMetrics for the specified Font. |
public static FontMetrics | |
public static FontRenderContext | |
private static FontRenderContext | |
public static float | |
private static FontRenderContext | |
private static FontRenderContext | |
public static Graphics2D | |
private static byte[] | |
public static int | Returns: the left side bearing of the first character of string or0 if the string is emptyJComponent that will display the string c, FontMetrics FontMetrics used to measure the String width fm, String String to get the left side bearing for. string)Returns the left side bearing of the first character of string. |
public static int | getLeftSideBearing(JComponent
JComponent that will display the string c, FontMetrics FontMetrics used to measure the String width fm, char Character to get the left side bearing for. firstChar)Returns the left side bearing of the first character of string. |
public static int | |
public static TreePath | Returns: the path to the changed nodeschanges in a tree model event, TreeModel corresponding tree model model)Returns the |
private static AttributedCharacterIterator | |
public static int | Returns: the intan key)Object specifying the int.Returns an integer from the defaults table. |
public static int | Returns: the intan key, Locale Object specifying the int. Returned value
is 0 if key is not available,the l)Locale for which the int is desiredReturns an integer from the defaults table that is appropriate for the given locale. |
public static int | Returns: the intan key, int Object specifying the int. Returned value
is 0 if key is not available,Returned value if defaultValue)key is not available,
or is not an IntegerReturns an integer from the defaults table. |
public static int | Returns: the intan key, Locale Object specifying the int. Returned value
is 0 if key is not available,the l, int Locale for which the int is desiredReturned value if defaultValue)key is not available,
or is not an IntegerReturns an integer from the defaults table that is appropriate for the given locale. |
private static boolean | isAccessClipboardGesture(InputEvent
InputEvent to check ie)Returns true if the given event is current gesture for accessing clipboard |
public static final boolean | Returns: true if TextLayout is required
false if TextLayout is not requiredcharacters to be tested text, int start start, int limit limit)checks whether TextLayout is required to handle characters. |
public static boolean | |
private static boolean | |
public static boolean | |
pack-priv static boolean | |
public static boolean | Returns: whether or not the scale was changeda ev)PropertyChangeEvent Returns whether or not the scale used by |
public static boolean | Returns: whether or not the scale was changedthe name of the property name, final Object the old value of the property oldValue, final Object the new value of the property newValue)Returns whether or not the scale used by |
public static boolean | |
private static boolean | |
private static SwingUtilities2. | Returns: theSection where the point liesthe rectangle rect, Point the point the check p, boolean true to use the horizontal axis,
or false for the vertical axistrue for left to right orientation,
or false for right to left orientation;
only used for horizontal calculationstrue for three sections,
or false for twoThis method divides a rectangle into two or three sections along the specified axis and determines which section the given point lies in on that axis; used by drag and drop when calculating drop locations. |
public static SwingUtilities2. | Returns: theSection where the point liesthe rectangle rect, Point the point the check p, boolean true for left to right orientation,
or false for right to left orientationtrue for three sections,
or false for twoThis method divides a rectangle into two or three sections along the horizontal axis and determines which section the given point lies in; used by drag and drop when calculating drop locations. |
public static SwingUtilities2. | Returns: theSection where the point liesthe rectangle rect, Point the point the check p, boolean true for three sections,
or false for twoThis method divides a rectangle into two or three sections along the vertical axis and determines which section the given point lies in; used by drag and drop when calculating drop locations. |
public static int | loc2IndexFileList(JList<?> list, Point point)
A variation of locationToIndex() which only returns an index if the Point is within the actual bounds of a list item (not just in the cell) and if the JList has the "List.isFileList" client property set. |
public static Object | Returns: a lazy value that creates theImageIcon
UIResource for the image,
or null if it cannot be foundthe first class to use in searching for the resource baseClass, final Class<?> an ancestor of rootClass, final String baseClass to finish the
search atthe name of the file to be found imageFile)Utility method that creates a |
private static Object | |
public static Object | Returns: a lazy value that creates theImageIcon
UIResource for the image,
or null if it cannot be foundthe first class to use in searching for the resource baseClass, final Class<?> an ancestor of rootClass, final String baseClass to finish the
search atthe name of the file to be found imageFile)Utility method that creates a |
private static <T> boolean | pointIsInActualBounds(JList<T> list, int index, Point point)
Returns true if the given point is within the actual bounds of the JList item at index (not just inside the cell). |
public static boolean | pointOutsidePrefSize(JTable table, int row, int column, Point p)
Returns true if the given point is outside the preferredSize of the item at the given row of the table. |
public static void | |
public static int | Returns: the modifier returned with ALT_GRAPH flag setthe modifier passed modifier)Sets the InputEvent.ALT_GRAPH mask on any modifier passed to the function |
public static void | setAntialiasingHintForScaledGraphics(Graphics
the graphics g, Object the antialiasing rendering hint hint)Sets the antialiasing rendering hint if its value is not null. |
public static void | setLeadAnchorWithoutSelection(ListSelectionModel model, int lead, int anchor)
Set the lead and anchor without affecting selection. |
public static void | setSkipClickCount(Component comp, int count)
Sets the |
public static boolean | shouldIgnore(MouseEvent me, JComponent c)
Ignore mouse events if the component is null, not enabled, the event is not associated with the left mouse button, or the event has been consumed. |
public static int | stringWidth(JComponent
JComponent that will display the string, may be null c, FontMetrics FontMetrics used to measure the String width fm, String String to get the width of string)Returns the width of the passed in String. |
public static float | stringWidth(JComponent
JComponent that will display the string, may be null c, FontMetrics FontMetrics used to measure the String width fm, String String to get the width of string, boolean use floating point API useFPAPI)Returns the width of the passed in String. |
public static <V> Future | |
public static <V> Future | Returns: a Future representing pending completion of the task, and whoseget() method will return the given
result value upon completionthe task to submit task, V the result to return upon successful completion result)Submits a Runnable task for execution on the EDT and returns a Future representing that task. |
private static int | |
public static boolean | |
public static boolean | useSelectedTextColor(Highlighter.
Determines whether the SelectedTextColor should be used for painting text foreground for the specified highlight. |