de.uni_paderborn.fujaba.gui
Class BasicPropertyEditor

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended byde.uni_paderborn.fujaba.gui.BasicPropertyEditor
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
Direct Known Subclasses:
PEMultiLink, PropertyEditor

public abstract class BasicPropertyEditor
extends javax.swing.JDialog

No comment provided by developer, please add a comment to improve documentation.

Version:
$Revision: 1.27 $
Author:
$Author: lowende $
See Also:
Serialized Form

Nested Class Summary
static class BasicPropertyEditor.ParseException
          thrown when the parse method fails
 
Nested classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  ASGElement asgElement
          No comment provided by developer, please add a comment to improve documentation.
protected  boolean readOnly
          No comment provided by developer, please add a comment to improve documentation.
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
BasicPropertyEditor(java.awt.Dialog dialog)
          Create an PropertyEditor with an Dialog as owner So the new PE lies always upon its owner
BasicPropertyEditor(javax.swing.JFrame frame)
          Constructor for class BasicPropertyEditor
 
Method Summary
protected  void additionalButtons(PEComponentGroup buttons)
          Override the function additionalButtons () to use additional buttons in the button area.
protected  void additionalProperties(PEEditPanel panel)
          Override the function additionalPropertied () to use additional Componenets like TextFields.
 boolean buttonActionPerformed(java.lang.String buttonIdentifier, java.awt.event.ActionEvent e)
          No comment provided by developer, please add a comment to improve documentation.
 void buttonOK_actionPerformed(java.awt.event.ActionEvent e)
          The function buttonOK_actionPerfomed () implements the action if the ok button is pressed.
protected abstract  void cancel()
          cancel () implements the action needed to destroy the changes Note: this function must be implemented by each ancestor
protected  void centerDialog()
          No comment provided by developer, please add a comment to improve documentation.
 void focusGained()
          Default function for Focus Events Should be override if a status text is required.
 void focusLost()
          Default function for Focus Events Should be override if a status text is required.
 de.uni_paderborn.fujaba.gui.PropertyEditor_Focus_Adapter getFocusAdapter()
          Action Interface to signal lost or gain of the focus
 javax.swing.JFrame getFrame()
          The function results a reference of the used frame.
 ASGElement getIncrement()
          This function results the context of the coresponding AST Object
protected  java.lang.String getPropertyName()
          getPropertyName () results the default name of the edited property
protected  void initPE()
          The function initialize any BasicPropertyEditor with - a edit area - a status area - a button area Note: each derived class have to call this function.
 boolean isReadOnly()
          Get the readOnly attribute of the BasicPropertyEditor object
protected abstract  void parse()
          parse () sets the information to the corresponding AST Note: this function must be implemented by each ancestor
 void setFrame(javax.swing.JFrame frame)
          Sets the frame attribute of the BasicPropertyEditor object
 void setIncrement(ASGElement asgElement)
          This functions sets the context to the AST see also getIncrement () and getClassIncrement ()
 void setIncrementWithoutParse(ASGElement asgElement)
          Sets the incrementWithoutParse attribute of the BasicPropertyEditor object
 boolean setPanel(PEEditPanel panel)
          The function setPanel () sets a user specified panel for edit area.
 void setReadOnly(boolean b)
          Sets the readOnly attribute of the BasicPropertyEditor object
 void setStatus(java.lang.String text)
          The function setStatus sets the label of the status area
 void showCentered()
          shows the Dialog centered
 void showLarge()
          shows the dialog larged and centered
protected abstract  void unparse()
          unparse () gets the necessary information from the corresponding AST The scann beginns at the Object returned by getIncrement () Note: this function must be implemented by each ancestor
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

readOnly

protected boolean readOnly
No comment provided by developer, please add a comment to improve documentation.


asgElement

protected ASGElement asgElement
No comment provided by developer, please add a comment to improve documentation.

Constructor Detail

BasicPropertyEditor

public BasicPropertyEditor(javax.swing.JFrame frame)
Constructor for class BasicPropertyEditor

Parameters:
frame - No description provided

BasicPropertyEditor

public BasicPropertyEditor(java.awt.Dialog dialog)
Create an PropertyEditor with an Dialog as owner So the new PE lies always upon its owner

Parameters:
dialog - The dialog (PE) which owns this PE
Method Detail

initPE

protected void initPE()
The function initialize any BasicPropertyEditor with - a edit area - a status area - a button area Note: each derived class have to call this function.


setFrame

public final void setFrame(javax.swing.JFrame frame)
Sets the frame attribute of the BasicPropertyEditor object

Parameters:
frame - The new frame value

setReadOnly

public void setReadOnly(boolean b)
Sets the readOnly attribute of the BasicPropertyEditor object

Parameters:
b - The new readOnly value

isReadOnly

public boolean isReadOnly()
Get the readOnly attribute of the BasicPropertyEditor object

Returns:
The readOnly value

getFrame

public javax.swing.JFrame getFrame()
The function results a reference of the used frame.

Returns:
The frame value

getFocusAdapter

public de.uni_paderborn.fujaba.gui.PropertyEditor_Focus_Adapter getFocusAdapter()
Action Interface to signal lost or gain of the focus

Returns:
a valid focus adapter

setIncrement

public void setIncrement(ASGElement asgElement)
This functions sets the context to the AST see also getIncrement () and getClassIncrement ()

Parameters:
asgElement - The new increment value

setIncrementWithoutParse

public void setIncrementWithoutParse(ASGElement asgElement)
Sets the incrementWithoutParse attribute of the BasicPropertyEditor object

Parameters:
asgElement - The new incrementWithoutParse value

getIncrement

public ASGElement getIncrement()
This function results the context of the coresponding AST Object

Returns:
a valid reference of a AST object

getPropertyName

protected java.lang.String getPropertyName()
getPropertyName () results the default name of the edited property

Returns:
a string with the default name of the property

unparse

protected abstract void unparse()
unparse () gets the necessary information from the corresponding AST The scann beginns at the Object returned by getIncrement () Note: this function must be implemented by each ancestor


parse

protected abstract void parse()
                       throws BasicPropertyEditor.ParseException
parse () sets the information to the corresponding AST Note: this function must be implemented by each ancestor

Throws:
BasicPropertyEditor.ParseException - when parsing fails and the dialog should remain on screen

cancel

protected abstract void cancel()
cancel () implements the action needed to destroy the changes Note: this function must be implemented by each ancestor


focusGained

public void focusGained()
Default function for Focus Events Should be override if a status text is required.


focusLost

public void focusLost()
Default function for Focus Events Should be override if a status text is required.


centerDialog

protected void centerDialog()
No comment provided by developer, please add a comment to improve documentation.


showCentered

public void showCentered()
shows the Dialog centered


showLarge

public void showLarge()
shows the dialog larged and centered


additionalProperties

protected void additionalProperties(PEEditPanel panel)
Override the function additionalPropertied () to use additional Componenets like TextFields. Each new Component must be added to the edit area.

Parameters:
panel - No description provided

additionalButtons

protected void additionalButtons(PEComponentGroup buttons)
Override the function additionalButtons () to use additional buttons in the button area. Each new button must be added to the button area.

Parameters:
buttons - No description provided

setPanel

public boolean setPanel(PEEditPanel panel)
The function setPanel () sets a user specified panel for edit area. The methode must be called before initPE and only as the first access to the edit panel.

Parameters:
panel - The new panel value
Returns:
true if the panel is set

setStatus

public void setStatus(java.lang.String text)
The function setStatus sets the label of the status area

Parameters:
text - The new status value

buttonOK_actionPerformed

public void buttonOK_actionPerformed(java.awt.event.ActionEvent e)
The function buttonOK_actionPerfomed () implements the action if the ok button is pressed. Normaly this function implements all steps to make the modification persistent in AST.

Parameters:
e - No description provided

buttonActionPerformed

public boolean buttonActionPerformed(java.lang.String buttonIdentifier,
                                     java.awt.event.ActionEvent e)
No comment provided by developer, please add a comment to improve documentation.

Parameters:
buttonIdentifier - No description provided
e - No description provided
Returns:
No description provided