44 |
import java.awt.Component; |
import java.awt.Component; |
45 |
import java.awt.Container; |
import java.awt.Container; |
46 |
import java.awt.Dimension; |
import java.awt.Dimension; |
47 |
|
import java.awt.EventQueue; |
48 |
import java.awt.FlowLayout; |
import java.awt.FlowLayout; |
49 |
import java.awt.FocusTraversalPolicy; |
import java.awt.FocusTraversalPolicy; |
50 |
import java.awt.Font; |
import java.awt.Font; |
243 |
* The text to show in the tooltip associated with this component. |
* The text to show in the tooltip associated with this component. |
244 |
* |
* |
245 |
* @see #setToolTipText |
* @see #setToolTipText |
246 |
* @see #getToolTipText |
* @see #getToolTipText() |
247 |
*/ |
*/ |
248 |
String toolTipText; |
String toolTipText; |
249 |
|
|
323 |
* try to request focus, but the request might fail. Thus it is only |
* try to request focus, but the request might fail. Thus it is only |
324 |
* a hint guiding swing's behavior. |
* a hint guiding swing's behavior. |
325 |
* |
* |
326 |
* @see #requestFocus |
* @see #requestFocus() |
327 |
* @see #isRequestFocusEnabled |
* @see #isRequestFocusEnabled |
328 |
* @see #setRequestFocusEnabled |
* @see #setRequestFocusEnabled |
329 |
*/ |
*/ |
1644 |
/** |
/** |
1645 |
* Performs double buffered repainting. |
* Performs double buffered repainting. |
1646 |
* |
* |
1647 |
* @param r the area to be repainted |
* @param g the graphics context to paint to |
1648 |
*/ |
*/ |
1649 |
void paintDoubleBuffered(Graphics g) |
void paintDoubleBuffered(Graphics g) |
1650 |
{ |
{ |
2096 |
*/ |
*/ |
2097 |
public void revalidate() |
public void revalidate() |
2098 |
{ |
{ |
2099 |
invalidate(); |
if (! EventQueue.isDispatchThread()) |
2100 |
RepaintManager.currentManager(this).addInvalidComponent(this); |
SwingUtilities.invokeLater(new Runnable() |
2101 |
|
{ |
2102 |
|
public void run() |
2103 |
|
{ |
2104 |
|
revalidate(); |
2105 |
|
} |
2106 |
|
}); |
2107 |
|
else |
2108 |
|
{ |
2109 |
|
invalidate(); |
2110 |
|
RepaintManager.currentManager(this).addInvalidComponent(this); |
2111 |
|
} |
2112 |
} |
} |
2113 |
|
|
2114 |
/** |
/** |
2328 |
public void setVisible(boolean v) |
public void setVisible(boolean v) |
2329 |
{ |
{ |
2330 |
super.setVisible(v); |
super.setVisible(v); |
2331 |
|
Container parent = getParent(); |
2332 |
|
if (parent != null) |
2333 |
|
parent.repaint(getX(), getY(), getWidth(), getHeight()); |
2334 |
|
revalidate(); |
2335 |
} |
} |
2336 |
|
|
2337 |
/** |
/** |