Dresden OCL Toolkit

tudresden.ocl.injection.reverseeng.propertypages
Class DefaultPropertyPage

java.lang.Object
  extended bytudresden.ocl.injection.reverseeng.propertypages.DefaultPropertyPage
All Implemented Interfaces:
PropertyPage

public class DefaultPropertyPage
extends Object
implements PropertyPage

Default implementation of the property page interface.

Version:
1.0
Author:
sz9 (Steffen Zschaler)

Field Summary
protected  EventListenerList m_ellListeners
           
private  boolean m_fEnabled
           
private  Icon m_iIcon
           
private  JComponent m_jcComponent
           
private  PropertyPageEvent m_ppeTheEvent
          Only one event is needed per PropertyPage.
private  String m_sTitle
           
private  String m_sToolTip
           
 
Constructor Summary
DefaultPropertyPage()
          Creates new DefaultPropertyPage.
DefaultPropertyPage(JComponent jcComponent)
          Creates new enabled DefaultPropertyPage with a component, but no title, icon or tool tip.
DefaultPropertyPage(JComponent jcComponent, boolean fEnabled)
          Creates new DefaultPropertyPage with a component, but no title, icon or tool tip.
DefaultPropertyPage(String sTitle, Icon iIcon, JComponent jcComponent)
          Creates new enabled DefaultPropertyPage with a component, title and icon, but no tool tip.
DefaultPropertyPage(String sTitle, Icon iIcon, JComponent jcComponent, boolean fEnabled)
          Creates new DefaultPropertyPage with a component, title and icon, but no tool tip.
DefaultPropertyPage(String sTitle, JComponent jcComponent)
          Creates new enabled DefaultPropertyPage with a component and title, but no icon or tool tip.
DefaultPropertyPage(String sTitle, JComponent jcComponent, boolean fEnabled)
          Creates new DefaultPropertyPage with a component and title, but no icon or tool tip.
DefaultPropertyPage(String sTitle, String sToolTip, Icon iIcon, JComponent jcComponent)
          Creates new enabled DefaultPropertyPage with a component, title, icon and tool tip.
DefaultPropertyPage(String sTitle, String sToolTip, Icon iIcon, JComponent jcComponent, boolean fEnabled)
          Creates new DefaultPropertyPage with a component, title and icon, and tool tip.
 
Method Summary
 void addPropertyPageListener(PropertyPageListener ppl)
          Start notifying the specified listener of events regarding this property page.
protected  void fireComponentChanged()
           
protected  void fireEnabledChanged()
           
protected  void fireIconChanged()
           
protected  void fireTitleChanged()
           
protected  void fireToolTipChanged()
           
 JComponent getComponent()
          Return the component to be displayed as the property page contents.
 Icon getIcon()
          Return the icon to be displayed in the property page's tab.
 String getTitle()
          Return the text to be displayed in the property page's tab.
 String getToolTip()
          Return the tool tip text to be associated with the property page.
 boolean isEnabled()
          Is the property page enabled?
 void onPropertyPageRemoved(PropertyPageContainer ppcParent)
          Invoked by the property page container to indicate removal of the page from the container.
 void removePropertyPageListener(PropertyPageListener ppl)
          Stop notifying the specified listener of events regarding this property page.
 void setComponent(JComponent jcNewComponent)
          Set the component to represent this property page.
 void setEnabled(boolean fEnabled)
          Set the enabled state of this property page.
 void setIcon(Icon iNewIcon)
          Set the icon to be associated with this property page.
 void setTitle(String sNewTitle)
          Set the title to be associated with this property page.
 void setToolTip(String sNewToolTip)
          Set the tool tip text to be associated with this property page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_sTitle

private String m_sTitle

m_sToolTip

private String m_sToolTip

m_iIcon

private Icon m_iIcon

m_jcComponent

private JComponent m_jcComponent

m_fEnabled

private boolean m_fEnabled

m_ellListeners

protected EventListenerList m_ellListeners

m_ppeTheEvent

private final PropertyPageEvent m_ppeTheEvent
Only one event is needed per PropertyPage.

Constructor Detail

DefaultPropertyPage

public DefaultPropertyPage()
Creates new DefaultPropertyPage. The default property page displays a disabled label saying "" under a title of "No Properties".


DefaultPropertyPage

public DefaultPropertyPage(JComponent jcComponent)
Creates new enabled DefaultPropertyPage with a component, but no title, icon or tool tip.

Parameters:
jcComponent - the component to be displayed as the property page.

DefaultPropertyPage

public DefaultPropertyPage(JComponent jcComponent,
                           boolean fEnabled)
Creates new DefaultPropertyPage with a component, but no title, icon or tool tip.

Parameters:
jcComponent - the component to be displayed as the property page.
fEnabled - if false, the property page will be initially disabled.

DefaultPropertyPage

public DefaultPropertyPage(String sTitle,
                           JComponent jcComponent)
Creates new enabled DefaultPropertyPage with a component and title, but no icon or tool tip.

Parameters:
sTitle - the title of the property page.
jcComponent - the component to be displayed as the property page.

DefaultPropertyPage

public DefaultPropertyPage(String sTitle,
                           JComponent jcComponent,
                           boolean fEnabled)
Creates new DefaultPropertyPage with a component and title, but no icon or tool tip.

Parameters:
sTitle - the title of the property page.
jcComponent - the component to be displayed as the property page.
fEnabled - if false, the property page will be initially disabled.

DefaultPropertyPage

public DefaultPropertyPage(String sTitle,
                           Icon iIcon,
                           JComponent jcComponent)
Creates new enabled DefaultPropertyPage with a component, title and icon, but no tool tip.

Parameters:
sTitle - the title of the property page.
iIcon - the icon to be associated with the property page.
jcComponent - the component to be displayed as the property page.

DefaultPropertyPage

public DefaultPropertyPage(String sTitle,
                           Icon iIcon,
                           JComponent jcComponent,
                           boolean fEnabled)
Creates new DefaultPropertyPage with a component, title and icon, but no tool tip.

Parameters:
sTitle - the title of the property page.
iIcon - the icon to be associated with the property page.
jcComponent - the component to be displayed as the property page.
fEnabled - if false, the property page will be initially disabled.

DefaultPropertyPage

public DefaultPropertyPage(String sTitle,
                           String sToolTip,
                           Icon iIcon,
                           JComponent jcComponent)
Creates new enabled DefaultPropertyPage with a component, title, icon and tool tip.

Parameters:
sTitle - the title of the property page.
sToolTip - the tool tip to be associated with the property page.
iIcon - the icon to be associated with the property page.
jcComponent - the component to be displayed as the property page.

DefaultPropertyPage

public DefaultPropertyPage(String sTitle,
                           String sToolTip,
                           Icon iIcon,
                           JComponent jcComponent,
                           boolean fEnabled)
Creates new DefaultPropertyPage with a component, title and icon, and tool tip.

Parameters:
sTitle - the title of the property page.
sToolTip - the tool tip to be associated with the property page.
iIcon - the icon to be associated with the property page.
jcComponent - the component to be displayed as the property page.
fEnabled - if false, the property page will be initially disabled.
Method Detail

getIcon

public Icon getIcon()
Return the icon to be displayed in the property page's tab.

Specified by:
getIcon in interface PropertyPage

setIcon

public void setIcon(Icon iNewIcon)
Set the icon to be associated with this property page.


getTitle

public String getTitle()
Return the text to be displayed in the property page's tab.

Specified by:
getTitle in interface PropertyPage

setTitle

public void setTitle(String sNewTitle)
Set the title to be associated with this property page.


getToolTip

public String getToolTip()
Return the tool tip text to be associated with the property page.

Specified by:
getToolTip in interface PropertyPage

setToolTip

public void setToolTip(String sNewToolTip)
Set the tool tip text to be associated with this property page.


getComponent

public JComponent getComponent()
Return the component to be displayed as the property page contents.

Specified by:
getComponent in interface PropertyPage

setComponent

public void setComponent(JComponent jcNewComponent)
Set the component to represent this property page.


isEnabled

public boolean isEnabled()
Is the property page enabled?

Specified by:
isEnabled in interface PropertyPage

setEnabled

public void setEnabled(boolean fEnabled)
Set the enabled state of this property page.


addPropertyPageListener

public void addPropertyPageListener(PropertyPageListener ppl)
Start notifying the specified listener of events regarding this property page.

Specified by:
addPropertyPageListener in interface PropertyPage
Parameters:
ppl - The property page listener to receive the events.

removePropertyPageListener

public void removePropertyPageListener(PropertyPageListener ppl)
Stop notifying the specified listener of events regarding this property page.

Specified by:
removePropertyPageListener in interface PropertyPage
Parameters:
ppl - The property page listener to be removed from the list of evcent receivers.

fireComponentChanged

protected void fireComponentChanged()

fireEnabledChanged

protected void fireEnabledChanged()

fireIconChanged

protected void fireIconChanged()

fireTitleChanged

protected void fireTitleChanged()

fireToolTipChanged

protected void fireToolTipChanged()

onPropertyPageRemoved

public void onPropertyPageRemoved(PropertyPageContainer ppcParent)
Invoked by the property page container to indicate removal of the page from the container.

Specified by:
onPropertyPageRemoved in interface PropertyPage

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.