|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alee.extended.tab.DocumentData<C>
public class DocumentData<C extends java.awt.Component>
This class represents basic data for single document opened in WebDocumentPane.
WebDocumentPane
,
PaneData
Field Summary | |
---|---|
protected java.awt.Color |
background
Document tab background color. |
protected boolean |
closeable
Whether this document is closeable or not. |
protected C |
component
Document content. |
protected boolean |
draggable
Whether this document is draggable or not. |
protected java.awt.Color |
foreground
Document title foreground color. |
protected javax.swing.Icon |
icon
Document icon. |
protected java.lang.String |
id
Document ID. |
protected java.util.List<DocumentDataListener> |
listeners
Document data listeners. |
protected java.lang.String |
title
Document title. |
Constructor Summary | |
---|---|
DocumentData(java.lang.String id,
javax.swing.Icon icon,
C component)
Constructs new document. |
|
DocumentData(java.lang.String id,
javax.swing.Icon icon,
java.lang.String title,
C component)
Constructs new document. |
|
DocumentData(java.lang.String id,
javax.swing.Icon icon,
java.lang.String title,
java.awt.Color background,
boolean closeable,
boolean draggable,
C component)
Constructs new document. |
|
DocumentData(java.lang.String id,
javax.swing.Icon icon,
java.lang.String title,
java.awt.Color background,
boolean closeable,
C component)
Constructs new document. |
|
DocumentData(java.lang.String id,
javax.swing.Icon icon,
java.lang.String title,
java.awt.Color background,
C component)
Constructs new document. |
|
DocumentData(java.lang.String id,
javax.swing.Icon icon,
java.lang.String title,
java.awt.Color foreground,
java.awt.Color background,
boolean closeable,
boolean draggable,
C component)
Constructs new document. |
|
DocumentData(java.lang.String id,
java.lang.String title,
C component)
Constructs new document. |
Method Summary | |
---|---|
void |
addListener(DocumentDataListener listener)
Adds document data listener. |
void |
fireBackgroundChanged(java.awt.Color oldBackground,
java.awt.Color newBackground)
Inform about tab background changes. |
void |
fireContentChanged(java.awt.Component oldComponent,
java.awt.Component newComponent)
Informs about tab component changes. |
void |
fireTitleChanged()
Informs about data changes which affects document tab view. |
java.lang.String |
getActualTitle()
Returns translated document title. |
java.awt.Color |
getBackground()
Returns document tab background color. |
C |
getComponent()
Returns document content. |
java.awt.Color |
getForeground()
Returns document title text foreground color. |
javax.swing.Icon |
getIcon()
Returns document icon. |
java.lang.String |
getId()
Returns document ID. |
java.util.List<DocumentDataListener> |
getListeners()
Returns available document data listeners. |
java.lang.String |
getTitle()
Returns document title. |
boolean |
isCloseable()
Returns whether document is closeable or not. |
boolean |
isDraggable()
Returns whether document is draggable or not. |
void |
removeListener(DocumentDataListener listener)
Removes document data listener. |
void |
setBackground(java.awt.Color background)
Sets document tab background color. |
void |
setCloseable(boolean closeable)
Sets whether document is closeable or not. |
void |
setComponent(C component)
Sets document content. |
void |
setDraggable(boolean draggable)
Sets whether document is draggable or not. |
void |
setForeground(java.awt.Color foreground)
Sets document title text foreground color |
void |
setIcon(javax.swing.Icon icon)
Sets document icon. |
void |
setId(java.lang.String id)
Sets document ID. |
void |
setTitle(java.lang.String title)
Sets document title. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient java.util.List<DocumentDataListener> listeners
protected java.lang.String id
protected javax.swing.Icon icon
protected java.lang.String title
protected java.awt.Color foreground
protected java.awt.Color background
protected boolean closeable
protected boolean draggable
protected C extends java.awt.Component component
Constructor Detail |
---|
public DocumentData(java.lang.String id, java.lang.String title, C component)
id
- document IDtitle
- document titlecomponent
- document contentpublic DocumentData(java.lang.String id, javax.swing.Icon icon, C component)
id
- document IDicon
- document iconcomponent
- document contentpublic DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, C component)
id
- document IDicon
- document icontitle
- document titlecomponent
- document contentpublic DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, java.awt.Color background, C component)
id
- document IDicon
- document icontitle
- document titlebackground
- document tab background colorcomponent
- document contentpublic DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, java.awt.Color background, boolean closeable, C component)
id
- document IDicon
- document icontitle
- document titlebackground
- document tab background colorcloseable
- whether document is closeable or notcomponent
- document contentpublic DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, java.awt.Color background, boolean closeable, boolean draggable, C component)
id
- document IDicon
- document icontitle
- document titlebackground
- document tab background colorcloseable
- whether document is closeable or notdraggable
- whether document is draggable or notcomponent
- document contentpublic DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, java.awt.Color foreground, java.awt.Color background, boolean closeable, boolean draggable, C component)
id
- document IDicon
- document icontitle
- document titleforeground
- document title foreground colorbackground
- document tab background colorcloseable
- whether document is closeable or notdraggable
- whether document is draggable or notcomponent
- document contentMethod Detail |
---|
public java.lang.String getId()
public void setId(java.lang.String id)
id
- new document IDpublic javax.swing.Icon getIcon()
public void setIcon(javax.swing.Icon icon)
icon
- new document iconpublic java.lang.String getTitle()
public java.lang.String getActualTitle()
public void setTitle(java.lang.String title)
title
- new document titlepublic java.awt.Color getForeground()
public void setForeground(java.awt.Color foreground)
foreground
- document title text foreground colorpublic java.awt.Color getBackground()
public void setBackground(java.awt.Color background)
background
- document tab background colorpublic boolean isCloseable()
public void setCloseable(boolean closeable)
closeable
- whether document is closeable or notpublic boolean isDraggable()
public void setDraggable(boolean draggable)
draggable
- whether document is draggable or notpublic C getComponent()
public void setComponent(C component)
component
- new document contentpublic java.util.List<DocumentDataListener> getListeners()
public void addListener(DocumentDataListener listener)
listener
- document data listener to addpublic void removeListener(DocumentDataListener listener)
listener
- document data listener to removepublic void fireTitleChanged()
public void fireBackgroundChanged(java.awt.Color oldBackground, java.awt.Color newBackground)
oldBackground
- previous background colornewBackground
- new background colorpublic void fireContentChanged(java.awt.Component oldComponent, java.awt.Component newComponent)
oldComponent
- previous tab contentnewComponent
- new tab content
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |