|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
com.imagero.gui.swing.plaf.ShapeUI
com.imagero.gui.swing.plaf.basic.BasicShapeUI
BasicShapeUI.java
| Constructor Summary | |
BasicShapeUI()
|
|
| Method Summary | |
boolean |
contains(javax.swing.JComponent c,
int x,
int y)
Returns true if the specified x,y location is
contained within the look and feel's defined shape of the specified
component. |
protected java.awt.event.ComponentListener |
createComponentListener()
|
protected java.awt.event.MouseListener |
createMouseListener()
|
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Returns an instance of the UI delegate for the specified component. |
protected java.awt.event.ComponentListener |
getComponentListener()
|
protected java.awt.event.MouseListener |
getMouseListener()
|
protected java.beans.PropertyChangeListener |
getPropertyChangeListener()
|
protected void |
installListeners(JShape js)
|
void |
installUI(javax.swing.JComponent c)
Configures the specified component appropriate for the look and feel. |
boolean |
isSelected(javax.swing.JComponent c)
|
void |
paint(java.awt.Graphics2D g,
javax.swing.JComponent c)
|
void |
paint(java.awt.Graphics g,
javax.swing.JComponent c)
Paints the specified component appropriate for the look and feel. |
protected void |
uninstallListeners(JShape js)
|
void |
uninstallUI(javax.swing.JComponent c)
Reverses configuration which was done on the specified component during installUI. |
| Methods inherited from class javax.swing.plaf.ComponentUI |
getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicShapeUI()
| Method Detail |
public boolean contains(javax.swing.JComponent c,
int x,
int y)
javax.swing.plaf.ComponentUItrue if the specified x,y location is
contained within the look and feel's defined shape of the specified
component. x and y are defined to be relative
to the coordinate system of the specified component. Although
a component's bounds is constrained to a rectangle,
this method provides the means for defining a non-rectangular
shape within those bounds for the purpose of hit detection.
c - the component where the x,y location is being queried;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsx - the x coordinate of the pointy - the y coordinate of the pointJComponent.contains(int, int),
Component.contains(int, int)protected java.awt.event.ComponentListener createComponentListener()
protected java.awt.event.MouseListener createMouseListener()
protected java.beans.PropertyChangeListener createPropertyChangeListener()
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
javax.swing.plaf.ComponentUIcreateUI
method that returns an instance of that UI delegate subclass.
If the UI delegate subclass is stateless, it may return an instance
that is shared by multiple components. If the UI delegate is
stateful, then it should return a new instance per component.
The default implementation of this method throws an error, as it
should never be invoked.
protected java.awt.event.ComponentListener getComponentListener()
protected java.awt.event.MouseListener getMouseListener()
protected java.beans.PropertyChangeListener getPropertyChangeListener()
protected void installListeners(JShape js)
public void installUI(javax.swing.JComponent c)
javax.swing.plaf.ComponentUIComponentUI instance is being installed
as the UI delegate on the specified component. This method should
completely configure the component for the look and feel,
including the following:
LayoutManager on the component if necessary.
PropertyChangeListener on the component in order
to detect and respond to component property changes appropriately.
c - the component where this UI delegate is being installedComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()public boolean isSelected(javax.swing.JComponent c)
public void paint(java.awt.Graphics2D g,
javax.swing.JComponent c)
public void paint(java.awt.Graphics g,
javax.swing.JComponent c)
javax.swing.plaf.ComponentUIComponentUI.update method when
the specified component is being painted. Subclasses should override
this method and use the specified Graphics object to
render the content of the component.
g - the Graphics context in which to paintc - the component being painted;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.update(java.awt.Graphics, javax.swing.JComponent)protected void uninstallListeners(JShape js)
public void uninstallUI(javax.swing.JComponent c)
javax.swing.plaf.ComponentUIinstallUI. This method is invoked when this
UIComponent instance is being removed as the UI delegate
for the specified component. This method should undo the
configuration performed in installUI, being careful to
leave the JComponent instance in a clean state (no
extraneous listeners, look-and-feel-specific property objects, etc.).
This should include the following:
c - the component from which this UI delegate is being removed;
this argument is often ignored,
but might be used if the UI object is stateless
and shared by multiple componentsComponentUI.installUI(javax.swing.JComponent),
JComponent.updateUI()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||