|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.SwingCustomizerView
public class SwingCustomizerView
CustomizerView is the base class for the com.sas component customizers. It uses a TabbedView object to separate functionally different parts of the customizer into Tabs.
Users of the CustomizerView should extend it and add tabs allowing the user to edit the state of the JavaBean. If the JavaBean being customized supports the com.sas.ComponentInterface, com.sas.awt.VisualInterface, com.sas.awt.CompositeInterface, or com.sas.awt.ContainerInterface, default tabs will be added to allow the user to edit the state of the JavaBean provided through these interfaces. These default tabs may be turned off by the subclass if desired.
Field Summary | |
---|---|
protected java.lang.Object |
bean
The JavaBean being customized |
protected java.lang.Class |
beanClass
|
protected com.sas.collection.AssociationList |
customizerPanelsAddedDuringMerge
|
protected DisplayTransformCustomizerPanel |
displayTransformCustomizerPanel
The panel used to edit the state of the JComponent's Model. |
protected boolean |
displayTransformTabVisible
|
protected JComponentCustomizerPanel |
jComponentCustomizerPanel
The panel used to edit the state of the JComponent. |
protected JComponentModelCustomizerPanel |
jComponentModelCustomizerPanel
The panel used to edit the state of the JComponent's Model. |
protected boolean |
jComponentModelTabVisible
|
protected boolean |
jComponentTabVisible
Whether the JComponent tabs are visible. |
protected boolean |
jModelInstanceTabVisible
|
protected com.sas.collection.AssociationList |
modelInstanceCustomizerPanels
The panel used to edit the state of the model attached to the JavaBean. |
static java.lang.String |
RB_KEY
|
protected java.beans.BeanInfo |
sourceBeanInfo
|
protected int |
startTabStart
Set to the number of the panel you add to the component's customizer that you want to view first |
Constructor Summary | |
---|---|
SwingCustomizerView()
Default constructor |
Method Summary | |
---|---|
void |
addModelInstanceTabs()
Adds customizer tabs for the model if any exists. |
void |
addNotify()
Set the selected tab to the first non-generic tab in the customizer. |
void |
addTab(java.lang.String tabTitle,
SwingCustomizerPanel panel)
|
void |
addTab(SwingCustomizerPanel panel)
|
protected DisplayTransformCustomizerPanel |
createDisplayTransformPanel()
Factory method to create the "Display Transform" tab. |
void |
customizerClosing()
customizerClosing() is called when the customizer for a component is closed. |
int |
getStartTabStart()
Gets which panel you view first that you added to the component's customizer manually. |
boolean |
isDisplayTransformTabVisible()
Returns whether the display transform customizer tab is displayed. |
boolean |
isJComponentModelTabVisible()
Returns whether the JComponentModel customizer tab is displayed. |
boolean |
isJComponentTabVisible()
Returns whether the ComponentInterface customizer tab is displayed. |
boolean |
isJModelInstanceTabVisible()
Returns whether the tab(s) for the attached model is displayed. |
protected boolean |
mergeCustomizers(java.beans.Customizer customizer)
Merges a customizer (Swing or AWT) with the current customizer. |
protected boolean |
mergeCustomizers(java.beans.Customizer customizer,
boolean mergeModelTab,
boolean mergeAppearanceTab)
Merges a customizer (Swing or AWT) with the current customizer. |
protected void |
onModelChanged()
Gets called when the model changes on teh component being customized |
void |
propertyChange(java.beans.PropertyChangeEvent ev)
|
void |
setDisplayTransformTabVisible(boolean visible)
Sets whether the display transform customizer tab is displayed. |
void |
setJComponentModelTabVisible(boolean visible)
Sets whether the JComponentModel customizer tab is displayed. |
void |
setJComponentTabVisible(boolean visible)
Sets whether the JComponent customizer tab is displayed. |
void |
setJModelInstanceTabVisible(boolean visible)
Sets whether the JModelInstance customizer tab is displayed. |
void |
setObject(java.lang.Object bean)
|
void |
setStartTabStart(int start)
Sets which panel you view first that you added to the component's customizer manually. |
void |
setViewer(java.lang.Object viewer)
To be overridden by model customizers in the case that they need info from a viewer that is being customized. |
Field Detail |
---|
public static final java.lang.String RB_KEY
protected java.lang.Object bean
setObject(java.lang.Object)
protected java.beans.BeanInfo sourceBeanInfo
protected java.lang.Class beanClass
protected int startTabStart
protected boolean jComponentTabVisible
protected boolean jComponentModelTabVisible
protected boolean jModelInstanceTabVisible
protected boolean displayTransformTabVisible
protected JComponentCustomizerPanel jComponentCustomizerPanel
protected JComponentModelCustomizerPanel jComponentModelCustomizerPanel
protected DisplayTransformCustomizerPanel displayTransformCustomizerPanel
protected com.sas.collection.AssociationList modelInstanceCustomizerPanels
protected com.sas.collection.AssociationList customizerPanelsAddedDuringMerge
Constructor Detail |
---|
public SwingCustomizerView()
Method Detail |
---|
public void addTab(SwingCustomizerPanel panel)
public void addTab(java.lang.String tabTitle, SwingCustomizerPanel panel)
public void setJComponentModelTabVisible(boolean visible)
whether
- the JComponentModel customizer tab is displayed.public void setDisplayTransformTabVisible(boolean visible)
whether
- the display transform customizer tab is displayed.public void setJModelInstanceTabVisible(boolean visible)
whether
- the JComponentModel customizer tab is displayed.public void setJComponentTabVisible(boolean visible)
whether
- the JComponent customizer tab is displayed.public boolean isJModelInstanceTabVisible()
public boolean isJComponentModelTabVisible()
public boolean isDisplayTransformTabVisible()
public boolean isJComponentTabVisible()
protected DisplayTransformCustomizerPanel createDisplayTransformPanel()
public void setObject(java.lang.Object bean)
setObject
in interface java.beans.Customizer
Customizer.setObject(java.lang.Object)
public void setViewer(java.lang.Object viewer)
viewer
- the viewer that the model is set onpublic void propertyChange(java.beans.PropertyChangeEvent ev)
propertyChange
in interface java.beans.PropertyChangeListener
protected void onModelChanged()
public void setStartTabStart(int start)
public int getStartTabStart()
public void addNotify()
addNotify
in class javax.swing.JComponent
public void addModelInstanceTabs()
protected boolean mergeCustomizers(java.beans.Customizer customizer)
protected boolean mergeCustomizers(java.beans.Customizer customizer, boolean mergeModelTab, boolean mergeAppearanceTab)
public void customizerClosing()
Subclasses of SwingCustomizerView which add panels which do not extend SwingCustomizerPanel should call an appropriate method on their panels to "unhook" the bean from the customizer. It is the responsibility of the UI control containing the SwingCustomizerView to call customizerClosing() on the SwingCustomizerView at the appropriate time.
customizerClosing
in interface com.sas.beans.CustomizerClosingInterface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |