com.borland.jbuilder.designer
Class DesignerEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.borland.primetime.util.DispatchableEvent
              |
              +--com.borland.jbuilder.designer.DesignerEvent
All Implemented Interfaces:
java.io.Serializable

public class DesignerEvent
extends DispatchableEvent

An event indicating one of the following:

See Also:
Serialized Form

Field Summary
static int CLOSED
          This event indicates that a component has been closed.
static int CLOSING
          This event indicates that a component is closing and that it is time to save any pending edits.
static int COMMITED
          This event indicates that a designer has committed changes to the source component.
static int OPENED
          This event indicates that a component has been opened and a designer was selected.
static int OPENING
          This event indicates that a component open has started.
static int RELEASED
          This event indicates that a component has been closed.
static int RELEASING
          This event indicates that a component is closing and that it is time to save any pending edits.
static int SHOW
          This event indicates a general designer window show/hide request.
static int TOOL_SELECTED
          This event indicates that a palette item has been selected.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DesignerEvent(java.lang.Object source)
          Constructs a DesignerEvent object indicating that a designer has committed changes to the source component.
DesignerEvent(java.lang.Object source, boolean show)
          Constructs a DesignerEvent object to indicate a general designer window show/hide request.
DesignerEvent(java.lang.Object source, com.borland.jbuilder.cmt.CmtComponentSource component)
          Constructs a DesignerEvent object to indicate a component open has started.
DesignerEvent(java.lang.Object source, com.borland.jbuilder.cmt.CmtComponentSource component, Designer designer)
          Constructs a DesignerEvent object to indicate a component has been opened.
DesignerEvent(java.lang.Object source, int id)
          Constructs a DesignerEvent object.
DesignerEvent(java.lang.Object source, java.lang.String toolName)
          Constructs a DesignerEvent object to indicate a palette tool selection.
 
Method Summary
 void dispatch(java.util.EventListener l)
          Dispatch this event to all registered listeners
 com.borland.jbuilder.cmt.CmtComponentSource getComponent()
          Retrieves the component that originated the event.
 DesignerViewer getContext()
          Retrieves the designer viewer context (event source for this event.
 Designer getDesigner()
          Retrieves the designer object for the component that originated the event.
 boolean getShow()
          Retrieves the boolean flag indicating whether component is being shown or hidden.
 java.lang.String getToolName()
          Retrieves the name of the selected palette tool.
 boolean isReleaseEvent()
          Returns true if this event is a releasing or released event.
protected  java.lang.String paramString()
          Retrieves a descriptive String for this event.
 
Methods inherited from class com.borland.primetime.util.DispatchableEvent
appendException, getExceptionChain, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOOL_SELECTED

public static final int TOOL_SELECTED
This event indicates that a palette item has been selected.

OPENING

public static final int OPENING
This event indicates that a component open has started.

OPENED

public static final int OPENED
This event indicates that a component has been opened and a designer was selected.

SHOW

public static final int SHOW
This event indicates a general designer window show/hide request.

COMMITED

public static final int COMMITED
This event indicates that a designer has committed changes to the source component.

CLOSING

public static final int CLOSING
This event indicates that a component is closing and that it is time to save any pending edits.

CLOSED

public static final int CLOSED
This event indicates that a component has been closed.

RELEASING

public static final int RELEASING
This event indicates that a component is closing and that it is time to save any pending edits.

Added in version 1.01 to track release of subcomponents. Not added to DesignerListener (would not be backward compatible).


RELEASED

public static final int RELEASED
This event indicates that a component has been closed.

Added in version 1.01 to track release of subcomponents. Not added to DesignerListener (would not be backward compatible).

Constructor Detail

DesignerEvent

public DesignerEvent(java.lang.Object source,
                     java.lang.String toolName)
Constructs a DesignerEvent object to indicate a palette tool selection.

Parameters:
source - component that originated the event
toolName - name of the selected palette tool

DesignerEvent

public DesignerEvent(java.lang.Object source,
                     com.borland.jbuilder.cmt.CmtComponentSource component)
Constructs a DesignerEvent object to indicate a component open has started.

Parameters:
source - component that originated the event
component - component being opened

DesignerEvent

public DesignerEvent(java.lang.Object source,
                     com.borland.jbuilder.cmt.CmtComponentSource component,
                     Designer designer)
Constructs a DesignerEvent object to indicate a component has been opened.

Parameters:
source - component that originated the event
component - component that was opened
designer - Designer object for the component that originated the event

DesignerEvent

public DesignerEvent(java.lang.Object source,
                     boolean show)
Constructs a DesignerEvent object to indicate a general designer window show/hide request.

Parameters:
source - component that originated the event
show - boolean indicating whether component is being shown or hidden

DesignerEvent

public DesignerEvent(java.lang.Object source,
                     int id)
Constructs a DesignerEvent object.

Parameters:
source - component that originated the event
id - integer indication the type of event

DesignerEvent

public DesignerEvent(java.lang.Object source)
Constructs a DesignerEvent object indicating that a designer has committed changes to the source component.

Parameters:
source - component that originated the event
Method Detail

getContext

public DesignerViewer getContext()
Retrieves the designer viewer context (event source for this event.

Returns:
DesignerViewer context for this event.

getToolName

public java.lang.String getToolName()
Retrieves the name of the selected palette tool.

Returns:
String name of selected palette tool

getComponent

public com.borland.jbuilder.cmt.CmtComponentSource getComponent()
Retrieves the component that originated the event.

Returns:
CmtComponentSource component that originated the event

getDesigner

public Designer getDesigner()
Retrieves the designer object for the component that originated the event.

Returns:
Designer object for the component event source.

getShow

public boolean getShow()
Retrieves the boolean flag indicating whether component is being shown or hidden.

Returns:
True if component is being shown, otherwise false.

isReleaseEvent

public boolean isReleaseEvent()
Returns true if this event is a releasing or released event.

Returns:
True if event is a releasing or a released event, otherwise false.

dispatch

public void dispatch(java.util.EventListener l)
Dispatch this event to all registered listeners

Overrides:
dispatch in class DispatchableEvent
Parameters:
l - chain of registered EventListeners for DesignerEvents

paramString

protected java.lang.String paramString()
Retrieves a descriptive String for this event.

Overrides:
paramString in class DispatchableEvent
Returns:
String object describing this DesignerEvent type