Java Code Examples for javax.swing.SwingUtilities#calculateInnerArea()
The following examples show how to use
javax.swing.SwingUtilities#calculateInnerArea() .
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: SeaGlassProgressBarUI.java From seaglass with Apache License 2.0 | 5 votes |
@Override protected Rectangle getBox(Rectangle r) { if (tileWhenIndeterminate) { return SwingUtilities.calculateInnerArea(progressBar, r); } else { return super.getBox(r); } }
Example 2
Source File: SeaGlassTextFieldUI.java From seaglass with Apache License 2.0 | 5 votes |
/** * DOCUMENT ME! * * @param context DOCUMENT ME! * @param g DOCUMENT ME! * @param c DOCUMENT ME! */ protected void paintPlaceholderText(SeaGlassContext context, Graphics g, JComponent c) { g.setColor(placeholderColor); g.setFont(c.getFont()); Rectangle innerArea = SwingUtilities.calculateInnerArea(c, null); Rectangle cancelBounds = getCancelButtonBounds(); context.getStyle().getGraphicsUtils(context).paintText(context, g, getPlaceholderText(g, innerArea.width + cancelBounds.width), innerArea.x, innerArea.y, -1); }
Example 3
Source File: IncorrectType58119a.java From netbeans with Apache License 2.0 | 4 votes |
public void doStuff1() { c = SwingUtilities.calculateInnerArea(null, null); }