|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DockElementRepresentative
A DockElementRepresentative is a Component that represents
a DockElement. For example a DockTitle would be a representation
of a Dockable. Or a small image in an overview-view might represent
any DockElement.
If a DockElementRepresentative is
added
to a DockController then it may gain new abilities. Clicking on the
representative might open the Dockables popup menu, dragging it will
drag the Dockable. However, events on the representative are
not automatically transfered to its DockElement, that step
is always performed by the module that observes the representative.
| Method Summary | |
|---|---|
void |
addMouseInputListener(javax.swing.event.MouseInputListener listener)
Adds a listener to this representative, it is not defined what to do with that listener, but most subclasses would just add the listener to their component. |
java.awt.Component |
getComponent()
Gets the Component which represents the element. |
DockElement |
getElement()
Gets the element which is represented by this. |
java.awt.Point |
getPopupLocation(java.awt.Point click,
boolean popupTrigger)
Tells whether a popup menu should be opened when the user clicks at click with the mouse. |
boolean |
isUsedAsTitle()
Tells whether this DockElementRepresentative is used as title. |
void |
removeMouseInputListener(javax.swing.event.MouseInputListener listener)
Removes a listener from this representative. |
boolean |
shouldFocus()
Tells whether a click onto this component should transfer the focus either to this component or to the Dockable. |
boolean |
shouldTransfersFocus()
Tells whether a click onto this component should transfer the focus to the Dockable or not. |
| Method Detail |
|---|
java.awt.Component getComponent()
Component which represents the element.
The result of this method must not change.
nullDockElement getElement()
this.
The result of this method must not change.
nullboolean isUsedAsTitle()
DockElementRepresentative is used as title.DockRelocator can allow drag & drop only for titles.Dockable should have only one element that is a title,
so if in doubt return false.
true if this representative should be seen as titleboolean shouldFocus()
Dockable.
true if clicking this component should influence focusboolean shouldTransfersFocus()
Dockable or not. If this
object is a Dockable, then a result of true might change the currently focused item
of itself. This property is ignored if shouldFocus() returns false.
void addMouseInputListener(javax.swing.event.MouseInputListener listener)
component. It is valid to do nothing.
listener - the new listenervoid removeMouseInputListener(javax.swing.event.MouseInputListener listener)
listener - the listener to remove
java.awt.Point getPopupLocation(java.awt.Point click,
boolean popupTrigger)
click with the mouse. If yes, then the top left edge
of the popup should be returned, otherwise null should be
returned.
click - the location where the user clicked with the mousepopupTrigger - whether the invocation is the systems popup trigger
or not. Many implementations of this method will return click
in case of true, and null in case of false
null if no
popup-menu should be opened
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||