net.xoetrope.optional.svg
Class XSvgButtonStateHelper
java.lang.Object
net.xoetrope.optional.svg.XSvgStateHelper
net.xoetrope.optional.svg.XSvgButtonStateHelper
public class XSvgButtonStateHelper
- extends XSvgStateHelper
A helper for an AbstractButton's state. The helper controls a number of
layers, including 'mask', 'rollover' and 'pressed'. The mask layer or
group element contains a shape that is used to define the client area of the
component. The 'rollover' layer includes graphical elements that are shown
when the mouse is over the component
Copyright (c) Xoetrope 2001-2006, see license.txt for more details
|
Method Summary |
XSvgElementState[][] |
getStates(com.kitfox.svg.SVGDiagram diagram)
Get the managed states in the svg diagram. |
void |
setComponent(javax.swing.JComponent comp)
Set the component instance |
boolean |
updateState(int itemId)
Update the svg state to be consistent with the button's state |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
states
protected XSvgElementState[][] states
XSvgButtonStateHelper
public XSvgButtonStateHelper()
- Creates a new instance of XSvgButtonStateHelper
setComponent
public void setComponent(javax.swing.JComponent comp)
- Set the component instance
- Overrides:
setComponent in class XSvgStateHelper
- Parameters:
comp - the component instacne
getStates
public XSvgElementState[][] getStates(com.kitfox.svg.SVGDiagram diagram)
- Get the managed states in the svg diagram. In the case of this button
helper the managed states are 'pressed' and 'rollover'.
- Overrides:
getStates in class XSvgStateHelper
- Parameters:
diagram - the svg diagram
- Returns:
- an array of state objects
updateState
public boolean updateState(int itemId)
- Update the svg state to be consistent with the button's state
- Overrides:
updateState in class XSvgStateHelper
- Parameters:
itemId - the item index or -1 to update all items
- Returns:
- true if the state has changed