public class DefaultDesktopPanel extends Object implements DesktopPanel
ICON_PROPERTY, TITLE_PROPERTY
Constructor and Description |
---|
DefaultDesktopPanel(String title,
String description,
JComponent component) |
Modifier and Type | Method and Description |
---|---|
void |
addDependency(ModelItem modelItem) |
void |
addPropertyChangeListener(PropertyChangeListener listener) |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
boolean |
dependsOn(ModelItem modelItem)
Checks if this desktop panel depends on the existence of the specified
model item, used for closing relevant panels.
|
JComponent |
getComponent()
Gets the component used to display this desktop panel
|
String |
getDescription()
Gets the description for this desktop panel..
|
Icon |
getIcon()
Returns the icon for this panel
|
ModelItem |
getModelItem()
Gets the model item associated with this desktop panel
|
String |
getTitle()
Gets the title for this desktop panel
|
void |
loadIcon(String path) |
boolean |
onClose(boolean canCancel)
Called when a desktop panel is about to be closed, may be overriden
(depending on situation) by returning false if canCancel is set to true.
|
void |
removePropertyChangeListener(PropertyChangeListener listener) |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
setTitle(String title) |
public DefaultDesktopPanel(String title, String description, JComponent component)
public void loadIcon(String path)
public String getTitle()
DesktopPanel
getTitle
in interface DesktopPanel
public String getDescription()
DesktopPanel
getDescription
in interface DesktopPanel
public void setTitle(String title)
public ModelItem getModelItem()
DesktopPanel
getModelItem
in interface DesktopPanel
public boolean onClose(boolean canCancel)
DesktopPanel
onClose
in interface DesktopPanel
public JComponent getComponent()
DesktopPanel
getComponent
in interface DesktopPanel
public boolean dependsOn(ModelItem modelItem)
DesktopPanel
dependsOn
in interface DesktopPanel
public void addDependency(ModelItem modelItem)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyChangeNotifier
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyChangeNotifier
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyChangeNotifier
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyChangeNotifier
public Icon getIcon()
DesktopPanel
getIcon
in interface DesktopPanel
Copyright © 2019. All Rights Reserved.