com.cbse.jeasy
Class JEObject

java.lang.Object
  extended by com.cbse.jeasy.JEObject
Direct Known Subclasses:
JEAction, JEBorder, JEButton, JEButtonGroup, JECheckBox, JECheckBoxMenuItem, JEColor, JEComboBox, JEComboList, JEConstraints, JEDataarea, JEDataclass, JEDatafield, JEDesktopPane, JEDialog, JEDynamicContainer, JEEditorPane, JEFont, JEFormat, JEFrame, JEGlobal, JEGradientPaint, JEHttpClient, JEInsets, JEInternalFrame, JEJDBC, JELabel, JEList, JELocale, JEMenu, JEMenuBar, JEMenuItem, JEMessage, JEMethodInvocation, JENotepad, JEOptionPane, JEPanel, JEPopupPane, JERadioButton, JERadioButtonMenuItem, JESpinner, JESplitPane, JEStore, JEString, JETabbedPane, JETable, JETexturePaint, JETheme, JETips, JEToolBar, JETreeNode

public class JEObject
extends java.lang.Object

The class all JEObjects extend. It holds a few variables all JEObjects have to define and methods the JEObjects have to implement.

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

Field Summary
static int DEVELOPPING
          Value for mode to find out if in running mode or in developping
static int INPUT_ERROR_DATE
          Value set by JEDataclass and used by InputVerifier No valid date
static int INPUT_ERROR_LENGTH
          Value set by JEDataclass and used by InputVerifier To much characters in an input field
static int INPUT_ERROR_MANDATORY
          Value set by JEDataclass and used by InputVerifier Mandatory field not filled
static int INPUT_ERROR_PARSE
          Value set by JEDataclass and used by InputVerifier Parse error occured
static int INPUT_ERROR_RANGE
          Value set by JEDataclass and used by InputVerifier Out of lower/upper range
static int INPUT_ERROR_TIME
          Value set by JEDataclass and used by InputVerifier No valid time
static int INPUT_ERRORS
          Value set if errors detected
static int NO_INPUT_ERROR
          Value set by JEDataclass and used by InputVerifier No error in the inputfield
static int RUNNING
           
 
Constructor Summary
JEObject()
           
 
Method Summary
 void backupEntry()
          The components that can hold data (JEDatafield, JECheckbox, ...) will store them to check later with entryChanged
 void clear()
          Cleares the entry of the jfc-Object.
 java.lang.Object deserializeValue(java.lang.String s)
          Converts a String to the JClass of the JEObject If the JEObject is a Radiobutton, the function returns a Boolean.
static boolean getApplet()
          If true the application was started as an applet
static java.lang.String getApplLocale()
          Gets the locale of the application
 java.lang.String getCenter()
          Gets the Center component when using a BorderLayout
 javax.swing.JComponent getComponent()
          Returns the JComponent of the Swing Object created by the JEasy object
 java.lang.String getEast()
          Gets the East component when using a BoprderLayout
 java.lang.String getElementAt(int n)
          Gets the component of element n
 int getElementSize()
          Gets the number of elements
 java.lang.String getId()
          Gets the id of the JEObject
 JECallBack getJCallBack()
          The method gets the class which will implement the interface JECallBack.
 java.lang.Class getJClass()
          Gets the Class of the JEObjects main Swing component
 java.lang.String getLabel()
          Gets the label of the JEObject
static int getMode()
           
 java.lang.String getName()
          Gets the label of the JEObject
 java.lang.String getNorth()
          Gets the North component when using a BorderLayout
 java.lang.String getObjLocale()
          Gets the locale of the object.
 java.lang.String getParentId()
          Gets the id of the JEObject where this JEObject was added
static boolean getPreview()
           
static java.lang.String getProjectDirectory()
           
 java.lang.String getProperty(java.lang.String name)
          Returns the value of the property identified by name.
 java.lang.String getRegisterText()
          Gets the text of registration
 java.lang.String getSouth()
          Gets the South component when using a BorderLayout
 boolean getStarted()
           
 java.lang.String getTitle()
          Gets the title of the JEObject
 java.lang.String getType()
          Gets the 2 char type of the JEObject
 java.lang.String getWest()
          Gets the West component when using a BorderLayout
 java.lang.String getXMLtag()
          Gets the xml tagname of the JEObject
 boolean isEditable()
          Gets the isEditable flag of the component
 boolean isEnabled()
          Gets the isEnabled flag of the component
static boolean isEnterprise()
          Gets the type of the JEasy version
static boolean isProfessional()
          Gets the type of the JEasy version
static boolean isStandard()
          Gets the type of the JEasy version
 boolean isVisible()
          Gets the isVisible flag of the component
 void JEadd(javax.swing.ButtonGroup bgrp)
          Adds the JEObject (JRadioButton) to ButtonGroup
 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(javax.swing.tree.DefaultMutableTreeNode tn)
          Adds the JEObject (DefaultMutableTreeNode) to DefaultMutableTreeNode
 void JEadd(javax.swing.JDesktopPane co)
          Adds the JEObject to a JDesktopPane
 void JEadd(javax.swing.JMenu me)
          Adds the JEObject (JMenuItem) to JMenu
 void JEadd(javax.swing.JMenuBar mb)
          Adds the JEObject (JMenu) to JMenuBar
 void JEadd(javax.swing.JPopupMenu me)
          Adds the JEObject (JMenuItem) to JPopupMenu
 void JEadd(javax.swing.JTable co)
          Adds the JEObject to JTable
 void JEadd(java.lang.String s, java.awt.Container co)
          Adds the JEObject to a Container with a BorderLayout
 void JEadd(java.lang.String s, javax.swing.JMenuBar mb)
          Adds the JMenuBar to a Container with a BorderLayout
 void JEaddTab(javax.swing.JTabbedPane co, java.awt.LayoutManager lm)
          Adds the JEObject to a JTabbedPane and its LayoutManager
 void removeProperties()
          Clears all propertie values for this jeasy object
 void removeProperty(java.lang.String name)
          Removes a propertie
 void restoreEntry()
          Sets the entry of the component to the backuped value
 java.lang.String serializeValue()
          Gets the convertion of the entry to a String
static void setApplet(boolean b)
          This value is to be set by the application itself
static void setApplLocale(java.lang.String locale)
          Sets the locale of the application
 void setEditable(boolean b)
          Enables or disables the inputfield for editing
 void setEditable(java.lang.Boolean b)
          Enables or disables the inputfield for editing
 void setEnabled(boolean b)
          Enables or disables the inputfield
 void setEnabled(java.lang.Boolean b)
          Enables or disables the inputfield
 boolean setFocus()
          Sets the focus on the first editable component
 void setJCallBack(JECallBack j)
          The method sets the class which will implement the interface JECallBack.
 void setMarkable(boolean b)
          Enables or disables the inputfield for editing
 void setMarkable(java.lang.Boolean b)
          Enables or disables the inputfield for editing
static void setMode(int mode)
           
 void setObjLocale(java.lang.String objLocale)
          Sets the locale of the object.
 void setParentId(java.lang.String parentId)
           
static void setPreview(boolean b)
           
static void setProjectDirectory(java.lang.String s)
           
 void setProperty(java.lang.String name, java.lang.String value)
          Sets the property name to have the value provided in value.
 void setStarted(boolean b)
           
 void setVisible(boolean b)
          Makes the component visible or invisible
 void setVisible(java.lang.Boolean b)
          Makes the component visible or invisible
 void start()
          Creates jfc-Objects with the given properties.
 boolean wasEntryChanged()
          The components compare the current entry with the data stored by backupEntry()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVELOPPING

public static final int DEVELOPPING
Value for mode to find out if in running mode or in developping

See Also:
Constant Field Values

RUNNING

public static final int RUNNING
See Also:
Constant Field Values

INPUT_ERRORS

public static final int INPUT_ERRORS
Value set if errors detected

See Also:
Constant Field Values

INPUT_ERROR_MANDATORY

public static final int INPUT_ERROR_MANDATORY
Value set by JEDataclass and used by InputVerifier Mandatory field not filled

See Also:
Constant Field Values

INPUT_ERROR_PARSE

public static final int INPUT_ERROR_PARSE
Value set by JEDataclass and used by InputVerifier Parse error occured

See Also:
Constant Field Values

INPUT_ERROR_LENGTH

public static final int INPUT_ERROR_LENGTH
Value set by JEDataclass and used by InputVerifier To much characters in an input field

See Also:
Constant Field Values

NO_INPUT_ERROR

public static final int NO_INPUT_ERROR
Value set by JEDataclass and used by InputVerifier No error in the inputfield

See Also:
Constant Field Values

INPUT_ERROR_DATE

public static final int INPUT_ERROR_DATE
Value set by JEDataclass and used by InputVerifier No valid date

See Also:
Constant Field Values

INPUT_ERROR_TIME

public static final int INPUT_ERROR_TIME
Value set by JEDataclass and used by InputVerifier No valid time

See Also:
Constant Field Values

INPUT_ERROR_RANGE

public static final int INPUT_ERROR_RANGE
Value set by JEDataclass and used by InputVerifier Out of lower/upper range

See Also:
Constant Field Values
Constructor Detail

JEObject

public JEObject()
Method Detail

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns the value of the property identified by name.

Parameters:
name - the name of the property to retrieve.
Returns:
the property value or null if no property exists.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets the property name to have the value provided in value.

Parameters:
name - the name of the property to set.
value - the value to set for the property.

removeProperty

public void removeProperty(java.lang.String name)
Removes a propertie

Parameters:
name - the name of the property to remove.

removeProperties

public void removeProperties()
Clears all propertie values for this jeasy object

Parameters:
name - the name of the property to set.
value - the value to set for the property.

getRegisterText

public java.lang.String getRegisterText()
Gets the text of registration

Returns:
text

isStandard

public static boolean isStandard()
Gets the type of the JEasy version

Returns:
true if product is JEasy Standard

isProfessional

public static boolean isProfessional()
Gets the type of the JEasy version

Returns:
true if product is JEasy Professional

isEnterprise

public static boolean isEnterprise()
Gets the type of the JEasy version

Returns:
true if product is JEasy Enterprise

getId

public java.lang.String getId()
Gets the id of the JEObject

Returns:
id of the JEObject

setJCallBack

public void setJCallBack(JECallBack j)
The method sets the class which will implement the interface JECallBack. All events from the JEObjects will be sent to the JECallBack

Parameters:
JECallBack -

getJCallBack

public JECallBack getJCallBack()
The method gets the class which will implement the interface JECallBack.


getMode

public static int getMode()
Returns:
Returns the mode.

setMode

public static void setMode(int mode)
Parameters:
mode - The mode to set.

getJClass

public java.lang.Class getJClass()
Gets the Class of the JEObjects main Swing component

Returns:
Class

deserializeValue

public java.lang.Object deserializeValue(java.lang.String s)
Converts a String to the JClass of the JEObject If the JEObject is a Radiobutton, the function returns a Boolean.

Returns:
Object

serializeValue

public java.lang.String serializeValue()
Gets the convertion of the entry to a String

Returns:
String

getParentId

public java.lang.String getParentId()
Gets the id of the JEObject where this JEObject was added

Returns:
id of the JEObject

getType

public java.lang.String getType()
Gets the 2 char type of the JEObject

Returns:
type of JEObject

getTitle

public java.lang.String getTitle()
Gets the title of the JEObject

Returns:
title

getName

public java.lang.String getName()
Gets the label of the JEObject

Returns:
lable

getLabel

public java.lang.String getLabel()
Gets the label of the JEObject

Returns:
label

getXMLtag

public java.lang.String getXMLtag()
Gets the xml tagname of the JEObject

Returns:
label

getNorth

public java.lang.String getNorth()
Gets the North component when using a BorderLayout

Returns:
id of the JEObject or null

getWest

public java.lang.String getWest()
Gets the West component when using a BorderLayout

Returns:
id of the JEObject or null

getCenter

public java.lang.String getCenter()
Gets the Center component when using a BorderLayout

Returns:
id of the JEObject or null

getEast

public java.lang.String getEast()
Gets the East component when using a BoprderLayout

Returns:
id of the JEObject or null

getSouth

public java.lang.String getSouth()
Gets the South component when using a BorderLayout

Returns:
id of the JEObject or null

getElementAt

public java.lang.String getElementAt(int n)
Gets the component of element n

Returns:
id of the JEObject or null

getElementSize

public int getElementSize()
Gets the number of elements

Returns:
id of the JEObject or null

getComponent

public javax.swing.JComponent getComponent()
Returns the JComponent of the Swing Object created by the JEasy object

Returns:
jcomponent

isVisible

public boolean isVisible()
Gets the isVisible flag of the component

Returns:
visible

isEnabled

public boolean isEnabled()
Gets the isEnabled flag of the component

Returns:
enabled

isEditable

public boolean isEditable()
Gets the isEditable flag of the component

Returns:
editable

backupEntry

public void backupEntry()
The components that can hold data (JEDatafield, JECheckbox, ...) will store them to check later with entryChanged


restoreEntry

public void restoreEntry()
Sets the entry of the component to the backuped value


wasEntryChanged

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

Returns:
true data was changed

start

public void start()
Creates jfc-Objects with the given properties.


clear

public void clear()
Cleares the entry of the jfc-Object.


setFocus

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


setVisible

public void setVisible(java.lang.Boolean b)
Makes the component visible or invisible


setVisible

public void setVisible(boolean b)
Makes the component visible or invisible


setEnabled

public void setEnabled(java.lang.Boolean b)
Enables or disables the inputfield


setEnabled

public void setEnabled(boolean b)
Enables or disables the inputfield


setEditable

public void setEditable(java.lang.Boolean b)
Enables or disables the inputfield for editing


setEditable

public void setEditable(boolean b)
Enables or disables the inputfield for editing


setMarkable

public void setMarkable(java.lang.Boolean b)
Enables or disables the inputfield for editing


setMarkable

public void setMarkable(boolean b)
Enables or disables the inputfield for editing


JEadd

public void JEadd(javax.swing.JDesktopPane co)
Adds the JEObject to a JDesktopPane

Parameters:
JDesktop -

JEadd

public void JEadd(java.awt.Container co)
Adds the JEObject to the Container

Parameters:
Container -

JEadd

public void JEadd(java.awt.Container co,
                  java.awt.LayoutManager lm)
Adds the JEObject to the Container and the Containers LayoutManager

Parameters:
Container - to hold the JEObject
LayoutManager - of the Container

JEadd

public void JEadd(java.lang.String s,
                  java.awt.Container co)
Adds the JEObject to a Container with a BorderLayout

Parameters:
String - "North" "South" "West" "East" "Center"
Container - to hold the JEObject

JEadd

public void JEadd(java.lang.String s,
                  javax.swing.JMenuBar mb)
Adds the JMenuBar to a Container with a BorderLayout

Parameters:
String - "North" "South" "West" "East" "Center"
JMenuBar - the MenuBar

JEaddTab

public void JEaddTab(javax.swing.JTabbedPane co,
                     java.awt.LayoutManager lm)
Adds the JEObject to a JTabbedPane and its LayoutManager

Parameters:
JTabbedPane - to hold the JEObject
LayoutManager - of the JTabbedPane

JEadd

public void JEadd(javax.swing.ButtonGroup bgrp)
Adds the JEObject (JRadioButton) to ButtonGroup

Parameters:
JRadioButton -

JEadd

public void JEadd(javax.swing.JTable co)
Adds the JEObject to JTable

Parameters:
JTable -

JEadd

public void JEadd(javax.swing.JMenu me)
Adds the JEObject (JMenuItem) to JMenu

Parameters:
JMenu - to hold the item

JEadd

public void JEadd(javax.swing.JPopupMenu me)
Adds the JEObject (JMenuItem) to JPopupMenu

Parameters:
JPopupMenu - to hold the item

JEadd

public void JEadd(javax.swing.JMenuBar mb)
Adds the JEObject (JMenu) to JMenuBar

Parameters:
JMenuBar - to hold the menu

JEadd

public void JEadd(javax.swing.tree.DefaultMutableTreeNode tn)
Adds the JEObject (DefaultMutableTreeNode) to DefaultMutableTreeNode

Parameters:
DefaultMutableTreeNode - to hold the object

getApplLocale

public static java.lang.String getApplLocale()
Gets the locale of the application

Returns:
Returns the locale.

setApplLocale

public static void setApplLocale(java.lang.String locale)
Sets the locale of the application

Parameters:
locale - The locale to set.

getObjLocale

public java.lang.String getObjLocale()
Gets the locale of the object. If there is no locale set the parent pf the object is asked. If no parent has an objLocale the applLocale is given back. If there is no objLocale and no applLocale null is returned

Returns:
Returns the objLocale.

setObjLocale

public void setObjLocale(java.lang.String objLocale)
Sets the locale of the object.

Parameters:
objLocale - The objLocale to set.

setPreview

public static void setPreview(boolean b)

getPreview

public static boolean getPreview()

setProjectDirectory

public static void setProjectDirectory(java.lang.String s)

getProjectDirectory

public static java.lang.String getProjectDirectory()

setApplet

public static void setApplet(boolean b)
This value is to be set by the application itself


getApplet

public static boolean getApplet()
If true the application was started as an applet


setStarted

public void setStarted(boolean b)

getStarted

public boolean getStarted()

setParentId

public void setParentId(java.lang.String parentId)
Parameters:
parentId - The parentId to set.