|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.prototypes.IlvPrototypeBeanSupport
public class IlvPrototypeBeanSupport
Support for beans generated from prototypes.
This class provides support for the implementation of
subclasses of Component which encapsulate
prototype instances.
IlvPrototypeBeanSupport is not meant to
be used directly by application developers. It is used
as a supporting class for Java Bean generated from prototypes.
The class IlvPrototypeBeanGenerator
generates Java Beans that delegate most of their methods
to an instance of IlvPrototypeBeanSupport.
This delegation mechanism allows the Bean generator to output different kinds of beans. A prototype bean can be:
java.awt.Component),
java.awt.Panel),
In addition, each Java Bean subclass will define property setters/getters for the prototype's public properties. Each bean will also define methods for adding and removing property change listeners for all the output properties of the prototype.
IlvGroup,
IlvPrototype,
IlvPrototypeInstance,
IlvPrototypeBeanGenerator,
Serialized Form| Field Summary | |
|---|---|
static long |
eventMask
The mask of events that will be enabled in the generated Java Beans. |
| Constructor Summary | |
|---|---|
IlvPrototypeBeanSupport(Component component)
Creates a new bean support object which provides the implementation of a Java Bean for a prototype. |
|
IlvPrototypeBeanSupport(Component component,
String prototypeName)
Creates a new bean support object which provides the implementation of a Java Bean for a given prototype. |
|
| Method Summary | |
|---|---|
void |
addObject(IlvGraphic graphic,
boolean redraw)
Implementation of the IlvGraphicBag interface. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener for any property. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Adds a property change listener for a named property. |
void |
applyToObject(IlvGraphic graphic,
IlvApplyObject f,
Object arg,
boolean redraw)
Implementation of the IlvGraphicBag interface. |
void |
ensureVisible(IlvPoint p)
Implementation of the IlvObjectInteractorContext interface. |
Component |
getComponent()
Returns the bean to which this support object is associated. |
Cursor |
getCursor()
Implementation of the IlvObjectInteractorContext interface. |
Color |
getDefaultGhostColor()
Implementation of the IlvObjectInteractorContext interface. |
Color |
getDefaultXORColor()
Implementation of the IlvObjectInteractorContext interface. |
IlvGraphicBag |
getGraphicBag()
Implementation of IlvGraphicBag interface. |
Graphics |
getGraphics()
Implementation of the IlvObjectInteractorContext interface. |
IlvGrid |
getGrid()
Implementation of the IlvObjectInteractorContext interface. |
IlvGroup |
getGroup()
Returns the group (usually an IlvPrototypeInstance)
associated with this prototype bean support object. |
IlvGraphic |
getObject(String name)
Implementation of the IlvGraphicBag interface. |
IlvGraphicEnumeration |
getObjects()
Implementation of the IlvGraphicBag interface. |
Dimension |
getPreferredSize()
Returns the size of the prototype instance's bounding box. |
String |
getPrototypeName()
Returns the name of the prototype associated with this support object. |
IlvTransformer |
getTransformer()
Implementation of the IlvObjectInteractorContext interface. |
boolean |
isCursorSet()
Implementation of the IlvObjectInteractorContext interface. |
void |
moveObject(IlvGraphic graphic,
float x,
float y,
boolean redraw)
Implementation of the IlvGraphicBag interface. |
void |
paint(Graphics g)
Draws the elements of the prototype. |
void |
processEvent(AWTEvent event)
Process events occurring on this bean. |
void |
reDrawObj(IlvGraphic graphic)
Implementation of the IlvGraphicBag interface. |
void |
reDrawRegion(IlvRegion region)
Implementation of the IlvGraphicBag interface. |
void |
removeObject(IlvGraphic graphic,
boolean redraw)
Implementation of the IlvGraphicBag interface. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener for any property. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Removes a property change listener for a named property. |
void |
repaint(IlvRect rect)
Implementation of the IlvObjectInteractorContext interface. |
void |
reshapeObject(IlvGraphic obj,
IlvRect newrect,
boolean redraw)
Implementation of the IlvGraphicBag interface. |
void |
setCursor(Cursor cursor)
Implementation of the IlvObjectInteractorContext interface. |
boolean |
setObjectName(IlvGraphic graphic,
String name)
Implementation of the IlvGraphicBag interface. |
void |
setPrototypeName(String prototypeName)
Creates a new instance of the prototype specified by the prototypeName parameters and sets it as the new
group encapsulated by this support object. |
void |
snapToGrid(IlvPoint p)
Implementation of the IlvObjectInteractorContext interface. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static long eventMask
| Constructor Detail |
|---|
public IlvPrototypeBeanSupport(Component component,
String prototypeName)
component - the Java Bean with which this support
object is associated.prototypeName - the name of the prototype, of the form
"libName.protoName". A new instance of this
prototype is created.public IlvPrototypeBeanSupport(Component component)
This constructor can be used to implement a generic
bean which can encapsulate any prototype. The
setPrototypeName method must be called to
choose a specific prototype.
component - the Java Bean with which this support
object is associated.| Method Detail |
|---|
public void paint(Graphics g)
This method is called from the associated bean's
paint method.
The graphic elements of the prototype instance encapsulated by this bean support object are drawn in an order that takes into account the relative layers of the elements.
public Dimension getPreferredSize()
This method is called from the associated bean's
getPreferredSize method.
public void processEvent(AWTEvent event)
This method is called from the associated bean's
processEvent method.
Events are dispatched to the graphic elements that have an object interactor.
event - the event to process.
public void addObject(IlvGraphic graphic,
boolean redraw)
IlvGraphicBag interface.
Do not call this method directly.
addObject in interface IlvGraphicBaggraphic - the graphic object.redraw - if true, the object is redrawn.
public void removeObject(IlvGraphic graphic,
boolean redraw)
IlvGraphicBag interface.
Do not call this method directly.
removeObject in interface IlvGraphicBaggraphic - the graphic object.redraw - if true, the object is redrawn.public IlvGraphicEnumeration getObjects()
IlvGraphicBag interface.
Do not call this method directly.
getObjects in interface IlvGraphicBagpublic void reDrawObj(IlvGraphic graphic)
IlvGraphicBag interface.
Do not call this method directly.
reDrawObj in interface IlvGraphicBaggraphic - the graphic object.public void reDrawRegion(IlvRegion region)
IlvGraphicBag interface.
Do not call this method directly.
reDrawRegion in interface IlvGraphicBagregion - the region to redraw.
public void reshapeObject(IlvGraphic obj,
IlvRect newrect,
boolean redraw)
IlvGraphicBag interface.
Do not call this method directly.
reshapeObject in interface IlvGraphicBagobj - The graphic object.newrect - The new desired bounding rectangle.redraw - If true the object is redrawn.
public void moveObject(IlvGraphic graphic,
float x,
float y,
boolean redraw)
IlvGraphicBag interface.
Do not call this method directly.
moveObject in interface IlvGraphicBaggraphic - The graphic object.x - The new desired x position.y - The new desired y position.redraw - If true the object is redrawn.
public void applyToObject(IlvGraphic graphic,
IlvApplyObject f,
Object arg,
boolean redraw)
IlvGraphicBag interface.
Do not call this method directly.
applyToObject in interface IlvGraphicBaggraphic - the graphic object.f - the method to apply.arg - the arguments passed to f.redraw - if true the object is redrawn.
public boolean setObjectName(IlvGraphic graphic,
String name)
IlvGraphicBag interface.
Do not call this method directly.
setObjectName in interface IlvGraphicBaggraphic - The graphic object.name - The new name.
true if the name can be changed.public IlvGraphic getObject(String name)
IlvGraphicBag interface.
Do not call this method directly.
getObject in interface IlvGraphicBagname - The graphic object name.public IlvGraphicBag getGraphicBag()
IlvGraphicBag interface.
The method returns null.
getGraphicBag in interface IlvGraphicBagpublic IlvTransformer getTransformer()
IlvObjectInteractorContext interface.
Do not call this method directly.
getTransformer in interface IlvObjectInteractorContextpublic void ensureVisible(IlvPoint p)
IlvObjectInteractorContext interface.
Do not call this method directly.
ensureVisible in interface IlvObjectInteractorContextp - The point.public IlvGrid getGrid()
IlvObjectInteractorContext interface.
Do not call this method directly.
getGrid in interface IlvObjectInteractorContextnull if
there is no grid.IlvManagerView.getGrid()public void snapToGrid(IlvPoint p)
IlvObjectInteractorContext interface.
Do not call this method directly.
snapToGrid in interface IlvObjectInteractorContextp - The point to be snapped to the grid.IlvGrid,
IlvGrid.snap(IlvPoint)public Color getDefaultXORColor()
IlvObjectInteractorContext interface.
Do not call this method directly.
getDefaultXORColor in interface IlvObjectInteractorContextpublic Color getDefaultGhostColor()
IlvObjectInteractorContext interface.
Do not call this method directly.
getDefaultGhostColor in interface IlvObjectInteractorContextpublic void setCursor(Cursor cursor)
IlvObjectInteractorContext interface.
Do not call this method directly.
setCursor in interface IlvObjectInteractorContextcursor - The cursor.public Cursor getCursor()
IlvObjectInteractorContext interface.
Do not call this method directly.
getCursor in interface IlvObjectInteractorContextpublic boolean isCursorSet()
IlvObjectInteractorContext interface.
Do not call this method directly.
isCursorSet in interface IlvObjectInteractorContextpublic Graphics getGraphics()
IlvObjectInteractorContext interface.
Do not call this method directly.
getGraphics in interface IlvObjectInteractorContextpublic void repaint(IlvRect rect)
IlvObjectInteractorContext interface.
Do not call this method directly.
repaint in interface IlvObjectInteractorContextrect - The rectangular region.public Component getComponent()
public String getPrototypeName()
public void setPrototypeName(String prototypeName)
throws IlvValueException,
IlvReadFileException
prototypeName parameters and sets it as the new
group encapsulated by this support object.
prototypeName - the prototype name. Prototype names are of the
form protolib.protoname.
IlvValueException
IlvReadFileException
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
propertyName - the name of the property.listener - the listener object.
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
propertyName - the name of the property.listener - the listener object.public void addPropertyChangeListener(PropertyChangeListener listener)
listener - the listener object.public void removePropertyChangeListener(PropertyChangeListener listener)
listener - the listener object.public IlvGroup getGroup()
IlvPrototypeInstance)
associated with this prototype bean support object.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||