com.cbse.jeasy
Class JETabbedPane

java.lang.Object
  extended by com.cbse.jeasy.JEObject
      extended by com.cbse.jeasy.JETabbedPane
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener

public class JETabbedPane
extends JEObject
implements javax.swing.event.ChangeListener

A class using a JTabbedPane.

Properties
name values comment
id * Id of the object. Let it begin with TP_
tabplacement
TOP
BOTTOMLEFTRIGHT
The TabPlacement Id of the object.
tablayoutpolicy
WRAP
SCROLL
The TabPlacement Id of the object.
x int value The x-coordinate of the new location's top-left corner in the owners's coordinate space.
y int value The y-coordinate of the new location's top-left corner in the owners's coordinate space.
border   Id of a border.
width int value The width of this component in pixels.
height int value The height of this component in pixels.
layout BorderLayout The layout of the dialog.
background   Id of a color used as the background of the tabs
foreground   Id of a color used as the foreground of the tabs
constraints   Constraints used when ded in GridBagLayout.
E1
.
En
  Elements to be added in the JTabbedPane.
* = property you have to set; bold = default value

Version:
%I%, %G%
Author:
H.Pfohl

Field Summary
 
Fields inherited from class com.cbse.jeasy.JEObject
DEVELOPPING, INPUT_ERROR_DATE, INPUT_ERROR_LENGTH, INPUT_ERROR_MANDATORY, INPUT_ERROR_PARSE, INPUT_ERROR_RANGE, INPUT_ERROR_TIME, INPUT_ERRORS, NO_INPUT_ERROR, RUNNING
 
Constructor Summary
JETabbedPane()
           
JETabbedPane(java.lang.String s)
          Reads the properties from a string.
 
Method Summary
 void add(java.lang.String jeid)
          Adds a JEasy object behind the last index with a tab title defined in JEasy (like in JEPanel) or the name of the component.
 void add(java.lang.String jeid, int n)
          Adds a JEasy object at the specified tab index with a tab title defined in JEasy (like in JEPanel) or the name of the component.
 void backupEntry()
          Tells all elements to backup their entry
 void clear()
          Clears the components in the component
 boolean getAntialiasing()
          Gets the anialialising flag
 java.awt.Color getBackground()
           
 javax.swing.border.Border getBorder()
          Get the border
 javax.swing.JComponent getComponent()
          Gets the JComponent based on this JEasy Object
 java.lang.String getElementAt(int n)
          Gets the component of element n
 int getElementSize()
          Gets the number of elements
 java.awt.Color getForeground()
           
 JEObject getSelectedObject()
           
 javax.swing.JTabbedPane getTabbedPane()
           
 java.awt.Font getTabbedPaneFont()
           
 int getTabLayoutPolicy()
          Gets the TabLayoutPolicy
 void JEadd(java.awt.Container co)
          Adds the JEObject to the Container
 void JEadd(java.awt.Container co, java.awt.LayoutManager lm)
          Adds the JEObject to the Container and the Containers LayoutManager
 void JEadd(java.lang.String border, java.awt.Container co)
          Adds the JEObject to a Container with a BorderLayout
 void removeTab(java.lang.String jeid)
          Removes the tab where the given JEasy object was added
 void removeTabAt(int n)
          Removes the tab at index
 void restoreEntry()
          Tells all elements to restore their backuped entry
 void setEnabled(boolean b)
          Enables or disables all inputfields in the panel
 boolean setFocus()
          Sets the focus on the first editable component
 void setSelectedObject(java.lang.String jeasyId)
          Select the jeasy panel which is element of the tabbdPane
 void setTabLayoutPolicy(int tlp)
          Sets the TabLayoutPolicy use JTabbedPane.WRAP_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUT
 void setTabPlacement(int tp)
          Sets the TabPlacement use SwingConstants.TOP SwingConstants.BOTTOM SwingConstants.LEFT SwingConstants.RIGHT
 void start()
          Creates the jfc components using the properties
 void stateChanged(javax.swing.event.ChangeEvent e)
           
 boolean wasEntryChanged()
          The components compare the current entry with the data stored by backupEntry()
 
Methods inherited from class com.cbse.jeasy.JEObject
deserializeValue, getApplet, getApplLocale, getCenter, getEast, getId, getJCallBack, getJClass, getLabel, getMode, getName, getNorth, getObjLocale, getParentId, getPreview, getProjectDirectory, getProperty, getRegisterText, getSouth, getStarted, getTitle, getType, getWest, getXMLtag, isEditable, isEnabled, isEnterprise, isProfessional, isStandard, isVisible, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEadd, JEaddTab, removeProperties, removeProperty, serializeValue, setApplet, setApplLocale, setEditable, setEditable, setEnabled, setJCallBack, setMarkable, setMarkable, setMode, setObjLocale, setParentId, setPreview, setProjectDirectory, setProperty, setStarted, setVisible, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JETabbedPane

public JETabbedPane(java.lang.String s)
Reads the properties from a string.

Parameters:
s - contains properties and values
See Also:
JE#PropertyString

JETabbedPane

public JETabbedPane()
Method Detail

getTabbedPane

public javax.swing.JTabbedPane getTabbedPane()

getBorder

public javax.swing.border.Border getBorder()
Get the border

Returns:
Border

getComponent

public javax.swing.JComponent getComponent()
Gets the JComponent based on this JEasy Object

Overrides:
getComponent in class JEObject
Returns:
JComponent

getElementSize

public int getElementSize()
Description copied from class: JEObject
Gets the number of elements

Overrides:
getElementSize in class JEObject
Returns:
id of the JEObject or null

getElementAt

public java.lang.String getElementAt(int n)
Description copied from class: JEObject
Gets the component of element n

Overrides:
getElementAt in class JEObject
Returns:
id of the JEObject or null

removeTab

public void removeTab(java.lang.String jeid)
Removes the tab where the given JEasy object was added

Parameters:
n -

removeTabAt

public void removeTabAt(int n)
Removes the tab at index

Parameters:
n -

add

public void add(java.lang.String jeid,
                int n)
Adds a JEasy object at the specified tab index with a tab title defined in JEasy (like in JEPanel) or the name of the component.

Parameters:
jeid - JEasy id
n - the index beginning with zero

add

public void add(java.lang.String jeid)
Adds a JEasy object behind the last index with a tab title defined in JEasy (like in JEPanel) or the name of the component.

Parameters:
jeid - JEasy id

getTabbedPaneFont

public java.awt.Font getTabbedPaneFont()

getForeground

public java.awt.Color getForeground()

getAntialiasing

public boolean getAntialiasing()
Gets the anialialising flag


getBackground

public java.awt.Color getBackground()

start

public void start()
Creates the jfc components using the properties

Overrides:
start in class JEObject
See Also:
JE#start

JEadd

public void JEadd(java.awt.Container co,
                  java.awt.LayoutManager lm)
Description copied from class: JEObject
Adds the JEObject to the Container and the Containers LayoutManager

Overrides:
JEadd in class JEObject

JEadd

public void JEadd(java.awt.Container co)
Description copied from class: JEObject
Adds the JEObject to the Container

Overrides:
JEadd in class JEObject

JEadd

public void JEadd(java.lang.String border,
                  java.awt.Container co)
Description copied from class: JEObject
Adds the JEObject to a Container with a BorderLayout

Overrides:
JEadd in class JEObject

setFocus

public boolean setFocus()
Sets the focus on the first editable component

Overrides:
setFocus in class JEObject
Returns:
true if focus was set on the first editable component false else

setTabPlacement

public void setTabPlacement(int tp)
Sets the TabPlacement use SwingConstants.TOP SwingConstants.BOTTOM SwingConstants.LEFT SwingConstants.RIGHT


setTabLayoutPolicy

public void setTabLayoutPolicy(int tlp)
Sets the TabLayoutPolicy use JTabbedPane.WRAP_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUT


getTabLayoutPolicy

public int getTabLayoutPolicy()
Gets the TabLayoutPolicy


clear

public void clear()
Clears the components in the component

Overrides:
clear in class JEObject

backupEntry

public void backupEntry()
Tells all elements to backup their entry

Overrides:
backupEntry in class JEObject

restoreEntry

public void restoreEntry()
Tells all elements to restore their backuped entry

Overrides:
restoreEntry in class JEObject

wasEntryChanged

public boolean wasEntryChanged()
The components compare the current entry with the data stored by backupEntry()

Overrides:
wasEntryChanged in class JEObject
Returns:
true data was changed

setEnabled

public void setEnabled(boolean b)
Enables or disables all inputfields in the panel

Overrides:
setEnabled in class JEObject

getSelectedObject

public JEObject getSelectedObject()

setSelectedObject

public void setSelectedObject(java.lang.String jeasyId)
Select the jeasy panel which is element of the tabbdPane

Parameters:
jeasyId -

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent e)
Specified by:
stateChanged in interface javax.swing.event.ChangeListener