com.alee.extended.tab
Class DocumentData

java.lang.Object
  extended by com.alee.extended.tab.DocumentData

public class DocumentData
extends java.lang.Object

This class represents basic data for single document opened in WebDocumentPane.

Author:
Mikle Garin
See Also:
How to use 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  java.awt.Component component
          Document content.
protected  boolean draggable
          Whether this document is draggable or not.
protected  javax.swing.Icon icon
          Document icon.
protected  java.lang.String id
          Document ID.
protected  java.lang.String title
          Document title.
 
Constructor Summary
DocumentData(java.lang.String id, javax.swing.Icon icon, java.awt.Component 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, java.awt.Component component)
          Constructs new document.
DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, java.awt.Color background, boolean closeable, java.awt.Component component)
          Constructs new document.
DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, java.awt.Color background, java.awt.Component component)
          Constructs new document.
DocumentData(java.lang.String id, javax.swing.Icon icon, java.lang.String title, java.awt.Component component)
          Constructs new document.
DocumentData(java.lang.String id, java.lang.String title, java.awt.Component component)
          Constructs new document.
 
Method Summary
 java.lang.String getActualTitle()
          Returns translated document title.
 java.awt.Color getBackground()
          Returns document tab background color.
 java.awt.Component getComponent()
          Returns document content.
 javax.swing.Icon getIcon()
          Returns document icon.
 java.lang.String getId()
          Returns document ID.
 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 setBackground(java.awt.Color background)
          Sets document tab background color.
 void setCloseable(boolean closeable)
          Sets whether document is closeable or not.
 void setComponent(java.awt.Component component)
          Sets document content.
 void setDraggable(boolean draggable)
          Sets whether document is draggable or not.
 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

id

protected java.lang.String id
Document ID. This ID have to be unique only within single WebDocumentPane instance.


icon

protected javax.swing.Icon icon
Document icon. Used to display icon on the document tab.


title

protected java.lang.String title
Document title. This can be a plain text or a language key. Whether this is a plain text or a language key will be determined automatically, you only have to provide it.


background

protected java.awt.Color background
Document tab background color. Used to color tab and tab content background.


closeable

protected boolean closeable
Whether this document is closeable or not. All documents are closeable by default, but you may change that.


draggable

protected boolean draggable
Whether this document is draggable or not. All documents are draggable by default, but you may change that.


component

protected java.awt.Component component
Document content. A component that represents document tab content.

Constructor Detail

DocumentData

public DocumentData(java.lang.String id,
                    java.lang.String title,
                    java.awt.Component component)
Constructs new document.

Parameters:
id - document ID
title - document title
component - document content

DocumentData

public DocumentData(java.lang.String id,
                    javax.swing.Icon icon,
                    java.awt.Component component)
Constructs new document.

Parameters:
id - document ID
icon - document icon
component - document content

DocumentData

public DocumentData(java.lang.String id,
                    javax.swing.Icon icon,
                    java.lang.String title,
                    java.awt.Component component)
Constructs new document.

Parameters:
id - document ID
icon - document icon
title - document title
component - document content

DocumentData

public DocumentData(java.lang.String id,
                    javax.swing.Icon icon,
                    java.lang.String title,
                    java.awt.Color background,
                    java.awt.Component component)
Constructs new document.

Parameters:
id - document ID
icon - document icon
title - document title
background - document tab background color
component - document content

DocumentData

public DocumentData(java.lang.String id,
                    javax.swing.Icon icon,
                    java.lang.String title,
                    java.awt.Color background,
                    boolean closeable,
                    java.awt.Component component)
Constructs new document.

Parameters:
id - document ID
icon - document icon
title - document title
background - document tab background color
closeable - whether document is closeable or not
component - document content

DocumentData

public DocumentData(java.lang.String id,
                    javax.swing.Icon icon,
                    java.lang.String title,
                    java.awt.Color background,
                    boolean closeable,
                    boolean draggable,
                    java.awt.Component component)
Constructs new document.

Parameters:
id - document ID
icon - document icon
title - document title
background - document tab background color
closeable - whether document is closeable or not
draggable - whether document is draggable or not
component - document content
Method Detail

getId

public java.lang.String getId()
Returns document ID.

Returns:
document ID

setId

public void setId(java.lang.String id)
Sets document ID.

Parameters:
id - new document ID

getIcon

public javax.swing.Icon getIcon()
Returns document icon.

Returns:
document icon

setIcon

public void setIcon(javax.swing.Icon icon)
Sets document icon.

Parameters:
icon - new document icon

getTitle

public java.lang.String getTitle()
Returns document title.

Returns:
document title

getActualTitle

public java.lang.String getActualTitle()
Returns translated document title.

Returns:
translated document title

setTitle

public void setTitle(java.lang.String title)
Sets document title.

Parameters:
title - new document title

getBackground

public java.awt.Color getBackground()
Returns document tab background color.

Returns:
document tab background color

setBackground

public void setBackground(java.awt.Color background)
Sets document tab background color.

Parameters:
background - document tab background color

isCloseable

public boolean isCloseable()
Returns whether document is closeable or not.

Returns:
true if document is closeable, false otherwise

setCloseable

public void setCloseable(boolean closeable)
Sets whether document is closeable or not.

Parameters:
closeable - whether document is closeable or not

isDraggable

public boolean isDraggable()
Returns whether document is draggable or not.

Returns:
true if document is draggable, false otherwise

setDraggable

public void setDraggable(boolean draggable)
Sets whether document is draggable or not.

Parameters:
draggable - whether document is draggable or not

getComponent

public java.awt.Component getComponent()
Returns document content.

Returns:
document content

setComponent

public void setComponent(java.awt.Component component)
Sets document content.

Parameters:
component - new document content