public class ManagerAdapter extends java.lang.Object implements FormatManager, SelectionManager, RolloverTextManager, PopupManager, java.io.Serializable
ManagerAdapter is the "do-nothing" default fallback
manager implementation for all managers. It is a singleton class.| Modifier | Constructor and Description |
|---|---|
protected |
ManagerAdapter()
Hidden default constructor for the one and only instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSelectComponent(Dataview view,
ComponentHandle component)
Can the given component be selected?
|
boolean |
canSelectComponents(Dataview view)
Can any components be selected?
|
java.lang.Object |
clone()
Must be able to clone the manager
|
void |
componentSelected(Dataview view,
ComponentHandle component)
The given component was selected.
|
void |
dataSourceChanged()
This implementation does nothing.
|
java.lang.Object |
formatDataValue(DataviewCommon view,
java.lang.Object data,
int column,
int row,
int[] pageHPos,
ViewFormat vf)
Given a data object return a formatted
version of that data object for the given data plane location.
|
java.util.Vector |
getBundles()
Retrieves the vector of rule bundles that this manager uses to format
Dataview items. |
static ManagerAdapter |
getInstance() |
javax.swing.JPopupMenu |
getPopupMenu(Dataview view,
ComponentHandle id)
Return a complete
JPopupMenu. |
java.lang.String |
getRolloverText(Dataview view,
ComponentHandle component,
int x,
int y,
int modifiers)
Return the rollover text to display over the given component
at the given location within the component.
|
RuleBundle |
getUIBundle()
Get the RuleBundle used by the UI.
|
void |
setBundles(DataviewCommon view,
java.util.Vector bundles)
Specifies the vector of
RuleBundle objects to use. |
void |
setUIBundle(DataviewCommon view,
RuleBundle bundle)
Set the RuleBundle used by the UI.
|
protected ManagerAdapter()
public void dataSourceChanged()
dataSourceChanged in interface Managerpublic static ManagerAdapter getInstance()
public java.lang.Object formatDataValue(DataviewCommon view, java.lang.Object data, int column, int row, int[] pageHPos, ViewFormat vf)
formatDataValue in interface FormatManagerview - the view needing formatting resolutiondata - the data to formatcolumn - the across location of this data itemrow - the down location of this data itempageHPos - the hPos of the page on which this data item residesvf - ViewFormat which may be used in the formattingpublic boolean canSelectComponents(Dataview view)
canSelectComponents in interface SelectionManagerview - the view needing selection resolutionpublic boolean canSelectComponent(Dataview view, ComponentHandle component)
canSelectComponent in interface SelectionManagerview - the view needing selection resolutioncomponent - the component that has been clicked on for selectionpublic void componentSelected(Dataview view, ComponentHandle component)
componentSelected in interface SelectionManagerview - the view needing selection resolutioncomponent - the component that has been
selectedpublic java.lang.String getRolloverText(Dataview view, ComponentHandle component, int x, int y, int modifiers)
getRolloverText in interface RolloverTextManagerview - the view needing selection resolutioncomponent - the component identification.x - the mouse x location in pixels within the componenty - the mouse y location in pixels within the componentmodifiers - any keyboard modifiers in effect at the time.public javax.swing.JPopupMenu getPopupMenu(Dataview view, ComponentHandle id)
PopupManagerJPopupMenu. The implementor
of this method is responsible for processing its own calls
from this popup menu.getPopupMenu in interface PopupManagerview - the view asking for popup informatiuonid - the component the popup occurred overJPopupMenu structure, or
null, in which case getPopupStrings
will be called.public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface RolloverTextManagerclone in class java.lang.Objectjava.lang.CloneNotSupportedException - if can't clonepublic void setBundles(DataviewCommon view, java.util.Vector bundles)
RuleBundle objects to use.
The vector is passed by reference.
You must call this method explicitly to ensure that proper notification
of changes is triggered.setBundles in interface FormatManagerbundles - The vector of rule bundles that this manager should
use.RuleBundlepublic java.util.Vector getBundles()
Dataview items.
Rule bundle vectors are passed by reference.
If you modify the vector that this method returns, call the
setBundles method explicitly to set the modified vector.getBundles in interface FormatManagerRuleBundlepublic RuleBundle getUIBundle()
getUIBundle in interface UIBundlepublic void setUIBundle(DataviewCommon view, RuleBundle bundle)
setUIBundle in interface UIBundleview - the view the RuleBundle applies tobundle - the new RuleBundle used by the UI