Business Objects
Quark Platform Documentation
Version 1.7.1_0
Business Objects

org.openquark.gems.client.valueentry
Class AlgebraicValueEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.openquark.gems.client.valueentry.ValueEditor
                      extended by org.openquark.gems.client.valueentry.StructuredValueEditor
                          extended by org.openquark.gems.client.valueentry.AlgebraicValueEditor
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class AlgebraicValueEditor
extends StructuredValueEditor

A value editor for editing an algebraic type. It allows the user to see all supported data constructors of the algebraic type, select a data constructor and enter values for the data constructor arguments.

Author:
Frank Worsley
See Also:
Serialized Form

Nested Class Summary
static class AlgebraicValueEditor.AlgebraicValueEditorProvider
          A custom value editor provider for the AlgebraicValueEditor.
 
Nested classes/interfaces inherited from class org.openquark.gems.client.valueentry.ValueEditor
ValueEditor.Info, ValueEditor.ValueEditorKeyListener
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class org.openquark.gems.client.valueentry.ValueEditor
valueEditorHierarchyManager, valueEditorManager
 
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AlgebraicValueEditor(ValueEditorHierarchyManager valueEditorHierarchyManager)
          Constructs a new AlgebraicValueEditor.
 
Method Summary
 void cancelValue()
          Cancel the edit of the value node currently under edit in this editor.
 void commitValue()
          Commit the value node currently under edit in this editor.
 void editorActivated()
          Notify the value editor that it has been activated.
 Component getDefaultFocusComponent()
          Get the component which by default has focus.
protected  void handleElementLaunchingEditor()
          When an element has launched a ValueEditor, there might be set-up issues that need to be done.
 void refreshDisplay()
          Refreshes the ValueEditor to display the latest data.
 void setEditable(boolean editable)
          Set the editable state for the ValueEditor.
 void setInitialValue()
          Call this method to make the ValueEditor initialize its values.
 
Methods inherited from class org.openquark.gems.client.valueentry.ValueEditor
addValueEditorListener, changeOwnerValue, childrenHasFocus, copyToClipboard, cutToClipboard, getContext, getMaxResizeDimension, getMinResizeDimension, getOwnerValueNode, getParentValueEditor, getValueEditorHierarchyManager, getValueNode, handleCancelGesture, handleCommitGesture, hasOverallFocus, isEditable, isEditorClosing, isMoveable, isResizable, notifyValueCanceled, notifyValueChanged, notifyValueCommitted, paintComponent, pasteFromClipboard, removeValueEditorListener, replaceValueNode, setContext, setEditorIsClosing, setLocation, setLocation, setMaxResizeDimension, setMinResizeDimension, setMoveable, setOwnerValueNode, setParentValueEditor, setResizable, setSize, setSize, userHasResized
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setName, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlgebraicValueEditor

public AlgebraicValueEditor(ValueEditorHierarchyManager valueEditorHierarchyManager)
Constructs a new AlgebraicValueEditor.

Parameters:
valueEditorHierarchyManager -
Method Detail

setEditable

public void setEditable(boolean editable)
Description copied from class: ValueEditor
Set the editable state for the ValueEditor. Normally a value editor is always editable. However, in some cases we may want a non-editable value editor. For example: A ValueEntryPanel containing a large a textual result would be too small to show all the text and there is no provision for scrolling. The user can call up the StringValueEditor, which does scroll, in order to more easily read all the text. But we don't want them trying to edit the result.

Overrides:
setEditable in class ValueEditor
See Also:
ValueEditor.setEditable(boolean)

commitValue

public void commitValue()
Description copied from class: ValueEditor
Commit the value node currently under edit in this editor.

Overrides:
commitValue in class ValueEditor
See Also:
ValueEditor.commitValue()

cancelValue

public void cancelValue()
Description copied from class: ValueEditor
Cancel the edit of the value node currently under edit in this editor.

Overrides:
cancelValue in class ValueEditor
See Also:
ValueEditor.cancelValue()

getDefaultFocusComponent

public Component getDefaultFocusComponent()
Description copied from class: ValueEditor
Get the component which by default has focus. This will be called, for instance, when the editor is activated

Specified by:
getDefaultFocusComponent in class ValueEditor
Returns:
Component the default component to receive focus, or null if none.
See Also:
ValueEditor.getDefaultFocusComponent()

handleElementLaunchingEditor

protected void handleElementLaunchingEditor()
Description copied from class: StructuredValueEditor
When an element has launched a ValueEditor, there might be set-up issues that need to be done. This method performs any set-up needed. (Eg: disable resizability, disable buttons, etc.)

Specified by:
handleElementLaunchingEditor in class StructuredValueEditor
See Also:
StructuredValueEditor.handleElementLaunchingEditor()

setInitialValue

public void setInitialValue()
Description copied from class: ValueEditor
Call this method to make the ValueEditor initialize its values. Note: Usually call this method after adding the ValueEditor to the display, setting its ValueNode, and correctly updating the currentEditor and the currentEditorStack, since some implementations of this method will require that pre-condition.

Specified by:
setInitialValue in class ValueEditor
See Also:
ValueEditor.setInitialValue()

editorActivated

public void editorActivated()
Description copied from class: ValueEditor
Notify the value editor that it has been activated. Some value editors may want to perform some setup, such as enabling/disabling buttons. This function is called if the editor is activated - either as a result of the hierarchy collapsing to it or because the user explicitly clicks on it.

Overrides:
editorActivated in class ValueEditor
See Also:
ValueEditor.editorActivated()

refreshDisplay

public void refreshDisplay()
Description copied from class: ValueEditor
Refreshes the ValueEditor to display the latest data. Note: The default implementation is to do nothing. All subclasses that need this will have to override this method. This method is called if the editor that is in the hierarchy below this editor is closed and this editor in turn becomes the current editor. It is also called when an editor that was previously not showing on screen is now shown on screen.

Overrides:
refreshDisplay in class ValueEditor
See Also:
ValueEditor.refreshDisplay()

Business Objects
Quark Platform Documentation
Version 1.7.1_0
Business Objects

Copyright © 2007 Business Objects. All rights reserved.