|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.document.DocumentComponent
public class DocumentComponent
A class that represents a document object.
Field Summary | |
---|---|
static String |
PROPERTY_BACKGROUND
|
static String |
PROPERTY_CLOSABLE
|
static String |
PROPERTY_COMPONENT
|
static String |
PROPERTY_ENABLED
|
static String |
PROPERTY_FOREGROUND
|
static String |
PROPERTY_ICON
|
static String |
PROPERTY_TITLE
|
static String |
PROPERTY_TOOLTIP
|
Constructor Summary | |
---|---|
DocumentComponent(JComponent component,
String name)
Creates a DocumentComponent with component and name, but no icon. |
|
DocumentComponent(JComponent component,
String name,
String title)
Creates a DocumentComponent with component, name and title, but no icon. |
|
DocumentComponent(JComponent component,
String name,
String title,
Icon icon)
Creates a DocumentComponent with component, name, title, and icon. |
Method Summary | |
---|---|
void |
addDocumentComponentListener(DocumentComponentListener l)
Adds the specified listener to receive internal frame events from this titled frame. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Adds a PropertyChangeListener to the listener list for a specific property. |
boolean |
allowClosing()
Allow this document closing. |
boolean |
allowMoving()
Allow this document moving. |
void |
cleanup()
|
protected void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue)
Support for reporting bound property changes for boolean properties. |
protected void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
Support for reporting bound property changes for integer properties. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Support for reporting bound property changes for Object properties. |
Color |
getBackground()
Gets the background. |
JComponent |
getComponent()
Gets the component. |
Component |
getDefaultFocusComponent()
Gets the default focus component for the document component. |
String |
getDisplayTitle()
The title to be displayed. |
com.jidesoft.document.PreviousState |
getDockPreviousState()
|
DocumentComponentListener[] |
getDocumentComponentListeners()
Returns an array of all the DocumentComponentListener s added to this DockableFrame with
addDocumentComponentListener . |
IDocumentPane |
getDocumentPane()
Gets the DocumentPane where this DocumentComponent is added to. |
com.jidesoft.document.PreviousState |
getFloatPreviousState()
|
Color |
getForeground()
Gets the foreground. |
Icon |
getIcon()
Gets the icon. |
Component |
getLastFocusedComponent()
Gets the last sub-component of the document component which held focus. |
String |
getName()
Gets the name of the document. |
PropertyChangeListener[] |
getPropertyChangeListeners()
Returns an array of all the property change listeners registered on this component. |
PropertyChangeListener[] |
getPropertyChangeListeners(String propertyName)
Returns an array of all the listeners which have been associated with the named property. |
String |
getTitle()
Gets the title. |
String |
getTooltip()
Gets the tooltip. |
boolean |
isClosable()
Gets the closable attribute of this DocumentComponent . |
void |
refocusLastFocusedComponent()
Set the last focused component to focus. |
void |
removeDocumentComponentListener(DocumentComponentListener l)
Removes the specified titled frame listener so that it no longer receives titled frame events from this titled frame. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list for a specific property. |
protected void |
renamePreviousState(String old,
String name,
com.jidesoft.document.PreviousState previousState)
|
void |
setAllowClosing(boolean allowClosing)
Sets allow closing. |
void |
setAllowMoving(boolean allowMoving)
Sets allow moving. |
void |
setBackground(Color background)
Sets the background. |
void |
setClosable(boolean closable)
Sets the closable attribute. |
void |
setComponent(JComponent component)
Sets the component. |
void |
setDefaultFocusComponent(Component defaultFocusComponent)
Sets the default focus component for the document component. |
void |
setDockPreviousState(com.jidesoft.document.PreviousState dockPreviousState)
|
protected void |
setDocumentPane(IDocumentPane documentPane)
When this DocumentComponent is added to a DocumentPane, this method will be called. |
void |
setFloatPreviousState(com.jidesoft.document.PreviousState floatPreviousState)
|
void |
setForeground(Color foreground)
Sets the foreground. |
void |
setIcon(Icon icon)
Sets the icon. |
protected void |
setLastFocusedComponent(Component lastFocusedComponent)
Sets the sub-component of the document component which currently has focus. |
void |
setName(String name)
Sets the name. |
void |
setTitle(String title)
Sets the title. |
void |
setTooltip(String tooltip)
Sets the tooltip. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_ICON
public static final String PROPERTY_TITLE
public static final String PROPERTY_TOOLTIP
public static final String PROPERTY_BACKGROUND
public static final String PROPERTY_FOREGROUND
public static final String PROPERTY_COMPONENT
public static final String PROPERTY_CLOSABLE
public static final String PROPERTY_ENABLED
Constructor Detail |
---|
public DocumentComponent(JComponent component, String name)
component
- the component of the documentname
- the name of the document. It has to unique within the same DocumentPane. If you try to create
two DocumentComponents with the same and try to open them in DocumentPane, only the first one
will be opened because the name is the same. If the title is not specified, we will display the
name on the tab. But if you specified the title, the name will never appear anywhere in the UI.
In the other word, the name could be non-localized string and the title should be localized.public DocumentComponent(JComponent component, String name, String title)
component
- the component of the documentname
- the name of the document. It has to unique within the same DocumentPane. If you try to create
two DocumentComponents with the same and try to open them in DocumentPane, only the first one
will be opened because the name is the same. If the title is not specified, we will display the
name on the tab. But if you specified the title, the name will never appear anywhere in the UI.
In the other word, the name could be non-localized string and the title should be localized.title
- the title of the document. It will be displayed on the tab on a DocumentPane. The title should
be a localized string.public DocumentComponent(JComponent component, String name, String title, Icon icon)
component
- the component of the documentname
- the name of the document. It has to unique within the same DocumentPane. If you try to create
two DocumentComponents with the same and try to open them in DocumentPane, only the first one
will be opened because the name is the same. If the title is not specified, we will display the
name on the tab. But if you specified the title, the name will never appear anywhere in the UI.
In the other word, the name could be non-localized string and the title should be localized.title
- the title of the document. It will be displayed on the tab on a DocumentPane. The title should
be a localized string.icon
- the icon for the document It will be displayed on the tab on a DocumentPane.Method Detail |
---|
public IDocumentPane getDocumentPane()
public void cleanup()
protected void setDocumentPane(IDocumentPane documentPane)
documentPane
- the document pane where the document component is added.public String getName()
public void setName(String name)
DocumentPane.renameDocument(java.lang.String, java.lang.String)
.
name
- name to be setprotected void renamePreviousState(String old, String name, com.jidesoft.document.PreviousState previousState)
public String getTitle()
public void setTitle(String title)
title
- title to be setpublic String getTooltip()
public void setTooltip(String tooltip)
tooltip
- tooltip to be setpublic Icon getIcon()
public void setIcon(Icon icon)
icon
- icon to be setpublic Color getBackground()
public void setBackground(Color background)
background
- background to be setpublic Color getForeground()
public void setForeground(Color foreground)
foreground
- foreground to be setpublic JComponent getComponent()
public void setComponent(JComponent component)
component
- component to be setpublic String getDisplayTitle()
public void setAllowClosing(boolean allowClosing)
allowClosing
- whether the document is allowed to be closed.public boolean allowClosing()
public void setAllowMoving(boolean allowMoving)
allowMoving
- whether the document is allowed to be moved.public boolean allowMoving()
public void addDocumentComponentListener(DocumentComponentListener l)
l
- the titled frame listenerpublic void removeDocumentComponentListener(DocumentComponentListener l)
l
- the titled frame listenerpublic DocumentComponentListener[] getDocumentComponentListeners()
DocumentComponentListener
s added to this DockableFrame
with
addDocumentComponentListener
.
DocumentComponentListener
s added or an empty array if no listeners have been
addedpublic Component getDefaultFocusComponent()
setDefaultFocusComponent
, getLastFocusedComponent
,
setLastFocusedComponent
public void setDefaultFocusComponent(Component defaultFocusComponent)
getDefaultFocusComponent
, getLastFocusedComponent
,
setLastFocusedComponent
defaultFocusComponent
- the component which should receive focus if the document is activated for the first
time.public Component getLastFocusedComponent()
setLastFocusedComponent
, getDefaultFocusComponent
,
setDefaultFocusComponent
protected void setLastFocusedComponent(Component lastFocusedComponent)
getLastFocusedComponent
, getDefaultFocusComponent
,
setDefaultFocusComponent
lastFocusedComponent
- last-focused sub-componentpublic void refocusLastFocusedComponent()
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener to be addedremovePropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
,
addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
,
removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
public PropertyChangeListener[] getPropertyChangeListeners()
PropertyChangeListener
s or an empty array if no property change
listeners are currently registeredaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(java.lang.String)
,
PropertyChangeSupport.getPropertyChangeListeners()
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- one of the property names listed abovelistener
- the PropertyChangeListener to be addedremovePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(java.lang.String)
,
addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
propertyName
- a valid property namelistener
- the PropertyChangeListener to be removedaddPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
,
getPropertyChangeListeners(java.lang.String)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
propertyName
- the property name.
PropertyChangeListeners
associated with the named property or an empty array if
no listeners have been addedaddPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
,
removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
,
getPropertyChangeListeners()
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valueprotected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valueprotected void firePropertyChange(String propertyName, int oldValue, int newValue)
propertyName
- the property whose value has changedoldValue
- the property's previous valuenewValue
- the property's new valuepublic boolean isClosable()
DocumentComponent
. By default, all
DocumentComponent
s can be closed by clicking on the close button. If this attribute is false, the
close button will not be visible if the close button is on tab.
public void setClosable(boolean closable)
closable
- whether the document can be closed.public com.jidesoft.document.PreviousState getDockPreviousState()
public void setDockPreviousState(com.jidesoft.document.PreviousState dockPreviousState)
public com.jidesoft.document.PreviousState getFloatPreviousState()
public void setFloatPreviousState(com.jidesoft.document.PreviousState floatPreviousState)
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |