|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.cbse.jeasy.JEObject
de.cbse.jeasy.JEComponent
public class JEComponent
The super class of all jeasy swing components. Most of the properties and event listeners for all components are set and handled in this class.
Properties :
| Field Summary | |
|---|---|
protected boolean |
animated
|
protected java.lang.String |
backup
|
protected javax.swing.JButton |
buttonBehind
|
protected int |
caretPosition
|
protected javax.swing.JComponent |
component
|
protected int |
endMarkPosition
|
protected boolean |
enterPressed
|
protected boolean |
isPressed
|
protected JEButton |
jeButtonBehind
|
protected javax.swing.JLabel |
label
|
protected javax.swing.JLabel |
labelBehind
|
protected java.lang.String |
labelText
|
protected java.lang.String |
parentId
|
protected javax.swing.JScrollPane |
scrollPane
|
protected javax.swing.JTree |
tree
|
protected javax.swing.tree.DefaultMutableTreeNode |
treeNode
|
protected java.awt.Window |
window
|
| Constructor Summary | |
|---|---|
JEComponent()
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
add(javax.swing.ButtonGroup bgrp)
Adds the JEObject (JRadioButton) to ButtonGroup |
void |
add(java.awt.Container container,
java.lang.String idContainer)
Adds the JEObject to the container regarding the LayoutManager of the container. |
void |
add(java.awt.Container container,
java.lang.String border,
java.lang.String idContainer)
Adds the JEasy object to a Container with a BorderLayout |
void |
add(javax.swing.tree.DefaultMutableTreeNode tn,
java.lang.String idContainer)
Adds the JEObject (DefaultMutableTreeNode) to DefaultMutableTreeNode |
void |
add(javax.swing.JDesktopPane co)
Adds the JEObject to a JDesktopPane |
void |
add(JEMenu me)
Adds the JEObject (JMenuItem) to JMenu |
void |
add(JEMenuBar me)
Adds the JEObject (JMenu) to JMenuBar |
void |
add(JEParentComponent parentComponent)
Adds the JEasy object to the JEParentObject regarding the LayoutManager of the JEParentObject. |
void |
add(JETree tr)
Adds the JETreeNode to the JETree |
void |
add(JETreeNode tn)
Adds this JETreenode to the given JETreeNode |
void |
add(javax.swing.JPopupMenu me)
Adds the JEObject (JMenuItem) to JMenu |
void |
add(javax.swing.JSplitPane container,
int index,
java.lang.String idContainer)
Adds the JEasy object to the SplitPane at index. |
void |
add(javax.swing.JTabbedPane container,
java.lang.String idTabbedPane)
Adds the JEObject to a JTabbedPane |
void |
add(javax.swing.JTable co)
Adds the JEObject to JTable |
void |
add(java.lang.String s,
javax.swing.JMenuBar mb)
Adds the JMenuBar to a Container with a BorderLayout |
void |
addListeners()
Adds all usable listeners to this object |
void |
backupEntry()
The current text will be stored internal to check against changes |
void |
caretPositionChanged(java.awt.event.InputMethodEvent event)
|
void |
caretUpdate(javax.swing.event.CaretEvent e)
|
void |
changedUpdate(javax.swing.event.DocumentEvent e)
|
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
int |
examine()
Examines the field with the current entry. |
int |
examine(java.lang.String s)
Checks and formats the entry of an input field. |
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
javax.swing.JComponent |
getAddableComponent()
Returns the JScrollpane if the component is scrollable. |
JEAnimation |
getAnimation()
Gets the animation of the component, its parent or the global animation. |
java.lang.String |
getBackupEntry()
Gets the backuped text |
javax.swing.JButton |
getButtonBehind()
Returns the JButton behind a JEasy object |
javax.swing.Icon |
getClosedIcon()
Gets the closed icon used in tree nodes. |
int |
getColumns()
Gets the columns of a field. |
javax.swing.JComponent |
getComponent()
Returns the JComponent of the Swing Object created by the JEasy object |
JEDataType |
getDataType()
Gets the JEDataType |
javax.swing.Icon |
getIcon()
Gets the icon of the component. |
JEButton |
getJEButtonBehind()
Returns the JEButton behind the JEasy object |
javax.swing.JLabel |
getJLabel()
Gets the label of the JEObject |
javax.swing.JScrollPane |
getJScrollpane()
Returns the JScrollpane if the component has one. |
javax.swing.JLabel |
getLabel()
Deprecated. |
javax.swing.JLabel |
getLabelBehind()
Returns the JLabel behind the field |
java.lang.String |
getLabelText()
Gets the text of the label of the JEObject |
javax.swing.Icon |
getLeafIcon()
Gets the leaf icon used in tree nodes. |
boolean |
getMandatory()
Gets whether the input field is mandatory or not |
java.lang.String |
getName()
Gets the name of the JEObject. |
javax.swing.Icon |
getOpenIcon()
Gets the opened icon used in tree nodes If it is not defined the icon is given instead. |
java.lang.String |
getParentId()
Gets the id of the JEObject where this JEObject was added |
java.lang.String |
getToolTipText()
Gets the toolTipText |
javax.swing.tree.DefaultMutableTreeNode |
getTreeNode()
|
java.lang.String |
getValue()
Gets the value of the component. |
java.lang.String |
getValueBeforeFocus()
Gets the value the component had before it gets the focus |
java.lang.String |
getValueNotNull()
Gets the value of the component. |
java.util.Vector |
getValues()
Gets the values of a object that may have more than one valid entries like a list. |
java.awt.Window |
getWindow()
Returns the Window if the Swing Object is a frame |
protected void |
init()
Creates jfc-Objects with the given properties. |
void |
inputMethodTextChanged(java.awt.event.InputMethodEvent event)
|
void |
insertUpdate(javax.swing.event.DocumentEvent e)
|
boolean |
isAnimated()
|
boolean |
isEditable()
|
boolean |
isExiting()
|
boolean |
isListening()
Returns whether the listener are enabled |
boolean |
isShowing()
|
boolean |
isVerified()
|
boolean |
isVisible()
Gets the isVisible flag of the component |
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
(package private) boolean |
jCallBackInputVerifier(java.lang.String id,
java.lang.String text,
int error)
Input Verifiers will send to JCallback |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
menuKeyPressed(javax.swing.event.MenuKeyEvent e)
|
void |
menuKeyReleased(javax.swing.event.MenuKeyEvent e)
|
void |
menuKeyTyped(javax.swing.event.MenuKeyEvent e)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
Performs mouse event action like rollover text and color |
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
void |
popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
|
void |
popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
|
void |
popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
refresh()
Sets all properties regarding of the locale without building new all swing components. |
void |
remove(JETreeNode tn)
Removes this JETreenode from the given JETreeNode |
void |
removeActionListeners()
Removes all added ActionListeners |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
void |
repaint()
Sets the entry of the component to the backuped value |
void |
restoreEntry()
Sets the entry of the component to the backuped value |
void |
restoreValueBeforeFocus()
|
void |
setAnimated(boolean animated)
|
void |
setBackground(java.awt.Color c)
Sets the background of the component |
JEWorker |
setBackground(javax.swing.JComponent comp,
java.awt.Color c)
Changes color using animation |
void |
setEnabled(boolean b)
Enables/disables the component and the button behind |
void |
setEnabled(java.lang.Boolean b)
Enables/disables the component and the button behind |
void |
setExiting(boolean exiting)
|
boolean |
setFocus()
Sets the focus on this component. |
void |
setForeground(java.awt.Color c)
Sets the foreground of the component |
JEWorker |
setForeground(javax.swing.JComponent comp,
java.awt.Color c)
Animated setForground |
void |
setIcon(javax.swing.Icon icon)
Sets the icon of the component. |
void |
setListening(boolean listening)
Activates or deactivates the listeners. |
void |
setMandatory(boolean b)
Sets the input field mandatory or not |
void |
setParentId(java.lang.String parentId)
|
void |
setProperties(java.util.HashMap properties)
Updates an object by setting properties. |
void |
setText(java.lang.String s)
Sets the text of the component. |
void |
setToolTipText(java.lang.String tooltip)
Sets the toolTipText |
void |
setTreeNode(javax.swing.tree.DefaultMutableTreeNode treeNode)
|
void |
setupComponent()
Set the property values to the component. |
void |
setValue(java.lang.String s)
Sets the value of the component. |
void |
setValueBeforeFocus(java.lang.String valueBeforeFocus)
To set manually. |
void |
setValues(java.util.Vector v)
Sets the values of the component. |
void |
setVerified(boolean b)
Is set by the inputverifier. |
void |
setVisible(boolean b)
Makes the component visible or invisible |
void |
setVisible(java.lang.Boolean b)
Makes the component visible or invisible |
void |
stateChanged(javax.swing.event.ChangeEvent e)
|
void |
tableChanged(javax.swing.event.TableModelEvent e)
|
void |
textUpdate(javax.swing.event.DocumentEvent e)
Event on editing a textfield |
boolean |
timerTask()
|
void |
transferFocus()
Transfers the focus to the next field |
void |
transferFocusBackward()
Transfers the focus to the previous field |
void |
treeCollapsed(javax.swing.event.TreeExpansionEvent e)
|
void |
treeExpanded(javax.swing.event.TreeExpansionEvent e)
|
void |
treeNodesChanged(javax.swing.event.TreeModelEvent e)
|
void |
treeNodesInserted(javax.swing.event.TreeModelEvent e)
|
void |
treeNodesRemoved(javax.swing.event.TreeModelEvent e)
|
void |
treeStructureChanged(javax.swing.event.TreeModelEvent e)
|
void |
valueChanged(javax.swing.event.ListSelectionEvent e)
|
void |
valueChanged(javax.swing.event.TreeSelectionEvent e)
|
boolean |
wasEntryChanged()
The components compares the current entry with the data stored by backupEntry() |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowGainedFocus(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowLostFocus(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String backup
protected javax.swing.JButton buttonBehind
protected int caretPosition
protected javax.swing.JComponent component
protected int endMarkPosition
protected boolean enterPressed
protected boolean isPressed
protected JEButton jeButtonBehind
protected javax.swing.JLabel label
protected javax.swing.JLabel labelBehind
protected java.lang.String labelText
protected java.lang.String parentId
protected javax.swing.JScrollPane scrollPane
protected javax.swing.JTree tree
protected javax.swing.tree.DefaultMutableTreeNode treeNode
protected java.awt.Window window
protected boolean animated
| Constructor Detail |
|---|
public JEComponent()
| Method Detail |
|---|
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void add(javax.swing.ButtonGroup bgrp)
JRadioButton -
public void add(java.awt.Container container,
java.lang.String idContainer)
container - idContainer -
public void add(java.awt.Container container,
java.lang.String border,
java.lang.String idContainer)
container - where the JButton is addedborder - "North" "South" "West" "East" "Center"idContainer - the JEasy id of the container
public void add(javax.swing.tree.DefaultMutableTreeNode tn,
java.lang.String idContainer)
DefaultMutableTreeNode - to hold the objectpublic void add(javax.swing.JDesktopPane co)
JDesktop - public void add(JEMenu me)
JMenu - to hold the itempublic void add(JEMenuBar me)
JMenu - to hold the itempublic void add(JEParentComponent parentComponent)
po - public void add(JETree tr)
tr - idContainer - public void add(JETreeNode tn)
tn - public void add(javax.swing.JPopupMenu me)
JMenu - to hold the item
public void add(javax.swing.JSplitPane container,
int index,
java.lang.String idContainer)
container - index - 0 or 1idContainer - the JEasy id of the container
public void add(javax.swing.JTabbedPane container,
java.lang.String idTabbedPane)
container - idTabbedPane - JEasy id of the TabbedPanepublic void add(javax.swing.JTable co)
JTable -
public void add(java.lang.String s,
javax.swing.JMenuBar mb)
String - "North" "South" "West" "East" "Center"JMenuBar - the MenuBarpublic void addListeners()
public void backupEntry()
public void caretPositionChanged(java.awt.event.InputMethodEvent event)
caretPositionChanged in interface java.awt.event.InputMethodListenerpublic void caretUpdate(javax.swing.event.CaretEvent e)
caretUpdate in interface javax.swing.event.CaretListenerpublic void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate in interface javax.swing.event.DocumentListenerpublic void componentHidden(java.awt.event.ComponentEvent e)
componentHidden in interface java.awt.event.ComponentListenerpublic void componentMoved(java.awt.event.ComponentEvent e)
componentMoved in interface java.awt.event.ComponentListenerpublic void componentResized(java.awt.event.ComponentEvent e)
componentResized in interface java.awt.event.ComponentListenerpublic void componentShown(java.awt.event.ComponentEvent e)
componentShown in interface java.awt.event.ComponentListenerpublic int examine()
public int examine(java.lang.String s)
public void focusGained(java.awt.event.FocusEvent e)
focusGained in interface java.awt.event.FocusListenerFocusListener.focusGained(java.awt.event.FocusEvent)public void focusLost(java.awt.event.FocusEvent e)
focusLost in interface java.awt.event.FocusListenerFocusListener.focusLost(java.awt.event.FocusEvent)public javax.swing.JComponent getAddableComponent()
public java.lang.String getBackupEntry()
public javax.swing.JButton getButtonBehind()
public javax.swing.Icon getClosedIcon()
public int getColumns()
public javax.swing.JComponent getComponent()
public JEDataType getDataType()
public javax.swing.Icon getIcon()
icon - public JEButton getJEButtonBehind()
public javax.swing.JScrollPane getJScrollpane()
@Deprecated public javax.swing.JLabel getLabel()
public javax.swing.JLabel getJLabel()
public javax.swing.JLabel getLabelBehind()
public java.lang.String getLabelText()
public javax.swing.Icon getLeafIcon()
public boolean getMandatory()
public java.lang.String getName()
public javax.swing.Icon getOpenIcon()
public java.lang.String getParentId()
getParentId in class JEObjectpublic java.lang.String getToolTipText()
public javax.swing.tree.DefaultMutableTreeNode getTreeNode()
public java.lang.String getValueNotNull()
public java.lang.String getValue()
public java.lang.String getValueBeforeFocus()
public java.util.Vector getValues()
public java.awt.Window getWindow()
protected void init()
init in class JEObjectpublic void inputMethodTextChanged(java.awt.event.InputMethodEvent event)
inputMethodTextChanged in interface java.awt.event.InputMethodListenerpublic void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate in interface javax.swing.event.DocumentListenerpublic boolean isEditable()
public boolean isListening()
public boolean isShowing()
public boolean isVerified()
public boolean isVisible()
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListener
boolean jCallBackInputVerifier(java.lang.String id,
java.lang.String text,
int error)
id - the id of the JEObjectID_parent - the id of the JEObject where the component was addedpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void menuKeyPressed(javax.swing.event.MenuKeyEvent e)
menuKeyPressed in interface javax.swing.event.MenuKeyListenerpublic void menuKeyReleased(javax.swing.event.MenuKeyEvent e)
menuKeyReleased in interface javax.swing.event.MenuKeyListenerpublic void menuKeyTyped(javax.swing.event.MenuKeyEvent e)
menuKeyTyped in interface javax.swing.event.MenuKeyListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenere - public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenere - public void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenere - public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenere - public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenerpublic void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
popupMenuCanceled in interface javax.swing.event.PopupMenuListenerpublic void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeInvisible in interface javax.swing.event.PopupMenuListenerpublic void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeVisible in interface javax.swing.event.PopupMenuListenerpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic void refresh()
public void remove(JETreeNode tn)
tn - public void removeActionListeners()
public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate in interface javax.swing.event.DocumentListenerpublic void repaint()
public void restoreEntry()
public void restoreValueBeforeFocus()
public void setBackground(java.awt.Color c)
public void setEnabled(boolean b)
public void setEnabled(java.lang.Boolean b)
public boolean setFocus()
public void setForeground(java.awt.Color c)
public void setIcon(javax.swing.Icon icon)
icon - public void setListening(boolean listening)
listening - public void setMandatory(boolean b)
public void setParentId(java.lang.String parentId)
setParentId in class JEObjectparentId - The parentId to set.public void setProperties(java.util.HashMap properties)
properties - public void setText(java.lang.String s)
s - public void setToolTipText(java.lang.String tooltip)
public void setTreeNode(javax.swing.tree.DefaultMutableTreeNode treeNode)
treeNode - public void setupComponent()
setupComponent in class JEObject
public JEWorker setForeground(javax.swing.JComponent comp,
java.awt.Color c)
comp - c -
public JEWorker setBackground(javax.swing.JComponent comp,
java.awt.Color c)
comp - c -
public JEAnimation getAnimation()
public void setValue(java.lang.String s)
public void setValueBeforeFocus(java.lang.String valueBeforeFocus)
valueBeforeFocus - public void setValues(java.util.Vector v)
public void setVerified(boolean b)
b - public void setVisible(boolean b)
public void setVisible(java.lang.Boolean b)
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged in interface javax.swing.event.ChangeListenerpublic void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged in interface javax.swing.event.TableModelListenerpublic void textUpdate(javax.swing.event.DocumentEvent e)
e - public boolean timerTask()
timerTask in class JEObjectpublic void transferFocus()
public void transferFocusBackward()
public void treeCollapsed(javax.swing.event.TreeExpansionEvent e)
treeCollapsed in interface javax.swing.event.TreeExpansionListenerpublic void treeExpanded(javax.swing.event.TreeExpansionEvent e)
treeExpanded in interface javax.swing.event.TreeExpansionListenerpublic void treeNodesChanged(javax.swing.event.TreeModelEvent e)
treeNodesChanged in interface javax.swing.event.TreeModelListenerpublic void treeNodesInserted(javax.swing.event.TreeModelEvent e)
treeNodesInserted in interface javax.swing.event.TreeModelListenerpublic void treeNodesRemoved(javax.swing.event.TreeModelEvent e)
treeNodesRemoved in interface javax.swing.event.TreeModelListenerpublic void treeStructureChanged(javax.swing.event.TreeModelEvent e)
treeStructureChanged in interface javax.swing.event.TreeModelListenerpublic void valueChanged(javax.swing.event.ListSelectionEvent e)
valueChanged in interface javax.swing.event.ListSelectionListenerpublic void valueChanged(javax.swing.event.TreeSelectionEvent e)
valueChanged in interface javax.swing.event.TreeSelectionListenerpublic boolean wasEntryChanged()
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerpublic void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenerpublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenerpublic boolean isAnimated()
public void setAnimated(boolean animated)
public void windowGainedFocus(java.awt.event.WindowEvent e)
windowGainedFocus in interface java.awt.event.WindowFocusListenerpublic void windowLostFocus(java.awt.event.WindowEvent e)
windowLostFocus in interface java.awt.event.WindowFocusListenerpublic boolean isExiting()
public void setExiting(boolean exiting)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||