wt.clients.csm.widgets
Class QueryFormEditorPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bywt.clients.widgets.BaseEditorPanel
                      extended bywt.clients.csm.widgets.QueryFormEditorPanel
All Implemented Interfaces:
Accessible, ImageObserver, MeasurementSystemChangeListener, MenuContainer, Serializable

public final class QueryFormEditorPanel
extends BaseEditorPanel
implements MeasurementSystemChangeListener

Query Form Editor Panel Consists of Attribute table and a buttonPanel with AddAtribute & RemoveAttribute buttons This can be in query mode where the last 2 columns are not visible and the rows that are set to hidden are not visible In postMode - The MultiSelectorDialog will show include column The use case for postmode is ClassificationLinkedNavigationNode - when overriding the queryform if the classificationTemplate option is selected, it shows this

See Also:
Serialized Form

Nested Class Summary
(package private)  class QueryFormEditorPanel.AttributeActionListener
           
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  Color bgColorText
           
(package private)  String[] buttonLabels
           
(package private)  ButtonPanel buttonPanel
           
(package private)  String[] columnNames
           
static boolean debugFlag
           
static int DEFAULT_MODE
           
(package private)  boolean editable
           
static int LOCAL_SEARCH_MODE
           
(package private)  int maxOrder
           
private  String measurementSystem
           
protected  int mode
           
private static int ORDER_COL
           
(package private)  boolean premode
           
(package private)  QueryFormTable qfTable
           
(package private)  QueryInfoObject qinfo
           
static int QUERY_MODE
           
protected  AbstractQueryFormView queryForm
           
protected  AbstractQueryFormElementView[] queryFormElements
           
protected  ResourceBundle resource
           
static String RESOURCE
           
(package private) static boolean useComboBox
           
private static int VALUE_COL
           
private static int VISIBLE_COL
           
 
Fields inherited from class wt.clients.widgets.BaseEditorPanel
 
Fields inherited from class javax.swing.JPanel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
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
QueryFormEditorPanel(ResourceBundle resource)
          Construct an QueryFormEditorPanel object nonquery, postselect, view mode
QueryFormEditorPanel(ResourceBundle resource, int mode)
          query/nonQuery/localSearch and post mode
QueryFormEditorPanel(ResourceBundle resource, int mode, boolean premode)
          nonquery/postselect/view and pre/post mode
QueryFormEditorPanel(ResourceBundle resource, int mode, boolean premode, QueryInfoObject qinfo)
           
 
Method Summary
protected  void addAttributes()
          Add the attributes to the container(All or none)
 void clearTable()
           
private  AttributeDefDefaultView[] getAttributeDefinitions()
           
private  String getAttributeName(AttributeDefDefaultView def)
           
private  String[] getColumnNames()
          Set the components in the panel
private  AttributeDefDefaultView getDefaultViewObject(Object obj)
           
 InlineValueEditorWidgetInterface getEnforcedWidget(StringDefView def)
           
 Insets getInsets()
           
 Object getItem()
          Retrieve the changes in the panel and set the changes in the object
 Object[] getLegalSet(StringDefView definition)
           
private  Vector getLocalSearchQFEVector(Vector attributes)
           
private  Vector getOnlyTheNewAttributes(Vector selectedObjects)
           
private  QueryFormElementDefaultView getQFElement(Object obj)
           
 AbstractQueryFormElementView[] getQueryFormElements()
           
private  Vector getTableRows()
           
private  boolean isAttributePresent(AttributeDefDefaultView att)
           
 boolean isDirty()
           
 boolean isEditable()
          Return true if in edit mode else false
private  boolean isLocalSearchMode()
           
 boolean isQueryMode()
           
static void printQueryFormValues(AbstractQueryFormView aqdf)
           
private  void removeAttributes()
          Remove the attributes from the container(All or none)
 void saveContainer()
           
protected  void setComponents()
           
 void setDirty(boolean dirty)
           
 void setEditable(boolean editable)
          Set the panel to Edit/View mode
 void setItem(Object item)
          Set the editor panel to reflect the new object
 void setMeasurementSystem(String measurementSystem)
           
private  boolean shouldDisableDetails()
           
private  boolean shouldDisplayAttribute(QueryFormElementDefaultView qfe)
           
private  boolean shouldDisplayExtraColumns()
           
private  Vector showAttributeSelector()
           
protected  void sortTheQueryFormElements()
           
 
Methods inherited from class wt.clients.widgets.BaseEditorPanel
getContext, needsScrollPane, setBusy
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

public static final String RESOURCE
See Also:
Constant Field Values

debugFlag

public static final boolean debugFlag

DEFAULT_MODE

public static final int DEFAULT_MODE
See Also:
Constant Field Values

QUERY_MODE

public static final int QUERY_MODE
See Also:
Constant Field Values

LOCAL_SEARCH_MODE

public static final int LOCAL_SEARCH_MODE
See Also:
Constant Field Values

mode

protected int mode

columnNames

String[] columnNames

buttonLabels

String[] buttonLabels

premode

boolean premode

editable

boolean editable

maxOrder

int maxOrder

qfTable

QueryFormTable qfTable

bgColorText

Color bgColorText

buttonPanel

ButtonPanel buttonPanel

qinfo

QueryInfoObject qinfo

queryForm

protected AbstractQueryFormView queryForm

queryFormElements

protected AbstractQueryFormElementView[] queryFormElements

VALUE_COL

private static final int VALUE_COL
See Also:
Constant Field Values

VISIBLE_COL

private static final int VISIBLE_COL
See Also:
Constant Field Values

ORDER_COL

private static final int ORDER_COL
See Also:
Constant Field Values

measurementSystem

private String measurementSystem

resource

protected ResourceBundle resource

useComboBox

static boolean useComboBox
Constructor Detail

QueryFormEditorPanel

public QueryFormEditorPanel(ResourceBundle resource)
Construct an QueryFormEditorPanel object nonquery, postselect, view mode

Parameters:
resource - ContainerRB

QueryFormEditorPanel

public QueryFormEditorPanel(ResourceBundle resource,
                            int mode)
query/nonQuery/localSearch and post mode


QueryFormEditorPanel

public QueryFormEditorPanel(ResourceBundle resource,
                            int mode,
                            boolean premode)
nonquery/postselect/view and pre/post mode


QueryFormEditorPanel

public QueryFormEditorPanel(ResourceBundle resource,
                            int mode,
                            boolean premode,
                            QueryInfoObject qinfo)
Method Detail

setEditable

public void setEditable(boolean editable)
Set the panel to Edit/View mode

Specified by:
setEditable in class BaseEditorPanel
Parameters:
editable - true for edit mode and false for view mode

isEditable

public boolean isEditable()
Return true if in edit mode else false

Specified by:
isEditable in class BaseEditorPanel
Returns:
true if in edit mode else false

getTableRows

private Vector getTableRows()

shouldDisableDetails

private boolean shouldDisableDetails()

shouldDisplayAttribute

private boolean shouldDisplayAttribute(QueryFormElementDefaultView qfe)

shouldDisplayExtraColumns

private boolean shouldDisplayExtraColumns()

isLocalSearchMode

private boolean isLocalSearchMode()

sortTheQueryFormElements

protected void sortTheQueryFormElements()

getAttributeName

private String getAttributeName(AttributeDefDefaultView def)

isQueryMode

public boolean isQueryMode()

setDirty

public void setDirty(boolean dirty)
Overrides:
setDirty in class BaseEditorPanel

isDirty

public boolean isDirty()
Overrides:
isDirty in class BaseEditorPanel

setItem

public void setItem(Object item)
Set the editor panel to reflect the new object

Specified by:
setItem in class BaseEditorPanel
Parameters:
item - AttributeContainer object

getItem

public Object getItem()
Retrieve the changes in the panel and set the changes in the object

Specified by:
getItem in class BaseEditorPanel
Returns:
Object AttributeContainer object

getInsets

public Insets getInsets()

getColumnNames

private String[] getColumnNames()
Set the components in the panel


setComponents

protected void setComponents()

clearTable

public void clearTable()

removeAttributes

private void removeAttributes()
Remove the attributes from the container(All or none)


getDefaultViewObject

private AttributeDefDefaultView getDefaultViewObject(Object obj)

showAttributeSelector

private Vector showAttributeSelector()

getOnlyTheNewAttributes

private Vector getOnlyTheNewAttributes(Vector selectedObjects)

addAttributes

protected void addAttributes()
Add the attributes to the container(All or none)


getLocalSearchQFEVector

private Vector getLocalSearchQFEVector(Vector attributes)

getQFElement

private QueryFormElementDefaultView getQFElement(Object obj)

getAttributeDefinitions

private AttributeDefDefaultView[] getAttributeDefinitions()

isAttributePresent

private boolean isAttributePresent(AttributeDefDefaultView att)

saveContainer

public void saveContainer()
                   throws ActionAbortedException
Throws:
ActionAbortedException

getQueryFormElements

public AbstractQueryFormElementView[] getQueryFormElements()

printQueryFormValues

public static void printQueryFormValues(AbstractQueryFormView aqdf)

setMeasurementSystem

public void setMeasurementSystem(String measurementSystem)
Specified by:
setMeasurementSystem in interface MeasurementSystemChangeListener
Parameters:
measurementSystem -

getEnforcedWidget

public InlineValueEditorWidgetInterface getEnforcedWidget(StringDefView def)

getLegalSet

public Object[] getLegalSet(StringDefView definition)