public class PIAGroupTree extends JTree implements PAppFieldComponent, PComponentAttribute, TreeSelectionListener, Serializable
PIAGroupTree
is a Swing-compatible, Portal-aware
group tree control. setData
expects an object or
an array of objects that each have a field (specified by
setModelFieldSpecification()
) that contains
a group object. That group object should contain a collection
of objects that also have group fields. The Display
specification pertains to the object with the group field, not
the group itself.Modifier and Type | Class and Description |
---|---|
class |
PIAGroupTree.GroupModel |
class |
PIAGroupTree.GrpModelNode |
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirector
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected boolean |
mbSupportLocaleBasedFormat |
protected PInfranetMessageFormat |
mFormat |
protected PFieldDelegate |
mImpl |
protected boolean |
mLazy |
protected PIASelectionSupport |
mSup |
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
PIAGroupTree()
Creates an Portal-aware tree component.
|
PIAGroupTree(PGroupTreeModel m)
Creates an Portal-aware tree component that contains data in
the given model.
|
Modifier and Type | Method and Description |
---|---|
void |
addIASelectionListener(PIASelectionListener l) |
void |
clear()
Clears existing data from the component.
|
String |
getAssociatedClass()
Gets the associated class, if any, for this field.
|
String |
getControllerClassName()
Retrieves the class name of this component's controller.
|
String |
getDisplayFieldDescription()
Gets the data field description used by the component.
|
String |
getDisplayFieldFormat()
Gets the display field format used by this component.
|
Object |
getField()
Gets a field from a model.
|
String |
getHelpID()
Gets the current help ID for this component.
|
boolean |
getLazyExpand()
Retrieves the state of the lazy expand flag.
|
String |
getModelFieldDescription()
Gets the data field description used by the component.
|
PModelHandle |
getModelHandle()
Retrieves the
PModelHandle for this component. |
Remote |
getRemoteComponent()
Gets a reference to the remote component for this object.
|
String |
getResourceName()
Gets the base resource name used in resource look up.
|
Vector |
getTools()
Gets a list of actions supported by this component.
|
boolean |
isCurrencyDisplay()
Determines whether the component currently displays currency data.
|
boolean |
isDirty()
Determines if this component is currently in a DIRTY state.
|
boolean |
isError()
Used to determine if this component is currently in an error state.
|
boolean |
isInputTracking()
Determines if input tracking is enabled.
|
boolean |
isLight()
Determines if this component defers
PModelHandle
knowledge to its parent container. |
boolean |
isRequired()
Determines if this component is required in its current context.
|
void |
removeIASelectionListener(PIASelectionListener l) |
void |
resetToDefault()
Resets the component value to the original value (that which was
established by calling
setDefault() ). |
void |
revertToPrimary(int primary)
Does nothing.
|
void |
setAssociatedClass(String name)
Sets the associated class, if any, for this group.
|
void |
setClean()
Used to reset the component to the CLEAN state.
|
void |
setCurrencyDisplay(boolean b)
Determines if this component currently displays currency data.
|
void |
setDefault()
Establishes the current value (or element count, depending on the
given component) as the default value.
|
void |
setDisplayFieldDescription(String fieldDisp)
Sets the description of the field(s) in the data model that
this component displays.
|
void |
setDisplayFieldFormat(String fieldForm)
Sets the
java.text.MessageFormat-type format used to display data in
this component. |
void |
setError(boolean b)
Marks that this component contains erroneous data in the current context
or unmarks the ERROR state, depending on the parameter.
|
void |
setField(Object data)
Sets the value of the field in a model.
|
void |
setHelpID(String id)
Sets the help ID for this component.
|
void |
setInputTracking(boolean b)
If the
inputTracking property is enabled, any changes made by the
user to the component are tracked and the component is marked DIRTY. |
void |
setLazyExpand(boolean doLazy)
Sets the state of the lazy expand flag.
|
void |
setModelFieldDescription(String fieldDesc)
Sets the description of the field in the data model that this
component is interested in.
|
void |
setModelHandle(PModelHandle data)
Establishes the
PModelHandle for this component. |
void |
setRequired(boolean b)
Marks this component as required in its current context.
|
void |
setResourceName(String name)
Sets the base resource name used in resource look up.
|
void |
setSupportLocaleBasedFormat(boolean bSupported)
Determines if the tree node labels are formatted uniformly based on the
displayfielddescription set on the tree, or if they are formatted
differently based on the locale info in each node
|
Object |
togglePrimaryToSecondary(int pri,
int sec)
Does nothing.
|
void |
unregister()
Used to disassociate this component from its delegate (controller)
|
void |
valueChanged(TreeSelectionEvent e)
Indicates that something has changed in the tree.
|
void |
viewDataChange(PViewDataChangeEvent event)
Overrides
PViewDataChangeListener . |
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getDragEnabled, getDropLocation, getDropMode, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setDragEnabled, setDropMode, setEditable, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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
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, transferFocusDownCycle, validate, validateTree
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, 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, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected boolean mLazy
protected transient PIASelectionSupport mSup
protected PInfranetMessageFormat mFormat
protected transient PFieldDelegate mImpl
protected boolean mbSupportLocaleBasedFormat
public PIAGroupTree()
public PIAGroupTree(PGroupTreeModel m)
m
- the default model to usepublic void setModelHandle(PModelHandle data) throws RemoteException
PModelHandle
for this component.setModelHandle
in interface PComponent
data
- the new PModelHandle
from which
to extract informationRemoteException
- thrown for errorspublic PModelHandle getModelHandle() throws RemoteException
PModelHandle
for this component.getModelHandle
in interface PComponent
PModelHandle
associated with
this component or null, if this is a lightweight
component.RemoteException
- thrown for errorspublic boolean isLight() throws RemoteException
PModelHandle
knowledge to its parent container. If so, the parent container passes the
PModelHandle
to this component on the server side (by way of
the controller), which saves a client/server round trip for data exchange.
If specific processing is required, when PModelHandle
is called
subclass this component and override this method. Otherwise,
setModelHandle()
will not be called.
isLight
in interface PComponent
RemoteException
- thrown for errorspublic String getControllerClassName() throws RemoteException
getControllerClassName
in interface PComponent
String
with the value
"com.portal.bas.comp.PIAGroupTreeBeanImpl".RemoteException
- thrown for errorspublic Vector getTools()
getTools
in interface PClientComponent
Vector
that contains Action
objects.public void setResourceName(String name)
setResourceName
in interface PClientComponent
name
- the new base resource namepublic String getResourceName()
getResourceName
in interface PClientComponent
String
with the base resource name.public Remote getRemoteComponent()
getRemoteComponent
in interface PAppComponent
Remote
component.public void setModelFieldDescription(String fieldDesc) throws RemoteException
setModelFieldDescription
in interface PFieldBean
fieldDesc
- a string that describes the field used by
this componentRemoteException
- thrown for errorspublic String getModelFieldDescription() throws RemoteException
getModelFieldDescription
in interface PFieldBean
String
description of the
field used by this component.RemoteException
- thrown for errorspublic void setDisplayFieldDescription(String fieldDisp) throws RemoteException
setDisplayFieldDescription
in interface PFieldBean
fieldDisp
- a String
that describes the
field displayed by this componentRemoteException
- thrown for errorspublic String getDisplayFieldDescription() throws RemoteException
getDisplayFieldDescription
in interface PFieldBean
String
description of the
field used by this component.RemoteException
- thrown for errorspublic void setDisplayFieldFormat(String fieldForm) throws RemoteException
java.text.MessageFormat-type
format used to display data in
this component. This is typically (but not necessarily) directly tied
to the DisplayFieldDescription
. For example, the
DisplayFieldDescription
might be "FldNameinfo[any].FldFirstName, FldNameinfo[any].FldLastName"
and the DisplayFieldFormat
for that might be "{1}, {0}" to display the
last name followed by a comma and then the first name.setDisplayFieldFormat
in interface PAppFieldComponent
fieldForm
- the format used to display the dataRemoteException
- thrown for errorspublic String getDisplayFieldFormat() throws RemoteException
getDisplayFieldFormat
in interface PAppFieldComponent
String
representation of the
display field format.RemoteException
- thrown for errorspublic void setAssociatedClass(String name) throws RemoteException
setAssociatedClass
in interface PFieldBean
name
- the class nameRemoteException
- thrown for errorspublic String getAssociatedClass() throws RemoteException
getAssociatedClass
in interface PFieldBean
String
with the associated class name.RemoteException
- thrown for errorspublic void setField(Object data) throws RemoteException
setField
in interface PFieldBean
data
- the value to setRemoteException
- thrown for errorspublic Object getField() throws RemoteException
getField
in interface PFieldBean
RemoteException
- thrown if an error occurspublic void setHelpID(String id)
setHelpID
in interface PAppFieldComponent
id
- the new help IDpublic String getHelpID()
getHelpID
in interface PAppFieldComponent
String
help ID.public void resetToDefault()
setDefault()
). If no default
value exists, the component data is cleared.This method is currently not implemented.
resetToDefault
in interface PComponentAttribute
public void clear()
This method is currently not implemented.
clear
in interface PComponentAttribute
public boolean isRequired()
isRequired
in interface PComponentAttribute
public void setRequired(boolean b)
setRequired
in interface PComponentAttribute
b
- if true, puts the component in REQUIRED statepublic boolean isError()
isError
in interface PComponentAttribute
public void setError(boolean b)
setError
in interface PComponentAttribute
b
- if true, puts the component in ERROR statepublic void setInputTracking(boolean b)
inputTracking
property is enabled, any changes made by the
user to the component are tracked and the component is marked DIRTY.
If the user modifies the data and returns it to its default or original
state, the component is marked CLEAN or not DIRTY.setInputTracking
in interface PComponentAttribute
b
- the state of the inputTracking
propertypublic boolean isInputTracking()
isInputTracking
in interface PComponentAttribute
public void setClean()
setClean
in interface PComponentAttribute
public boolean isDirty()
isDirty
in interface PComponentAttribute
public void setDefault()
This method is currently not implemented.
setDefault
in interface PComponentAttribute
public boolean isCurrencyDisplay()
String
data.isCurrencyDisplay
in interface PComponentAttribute
public void setCurrencyDisplay(boolean b)
Because this widget displays String, the value passed in
is always false.
setCurrencyDisplay
in interface PComponentAttribute
b
- if true, indicates that the widget currently displays currency datapublic Object togglePrimaryToSecondary(int pri, int sec) throws RemoteException
togglePrimaryToSecondary
in interface PComponentAttribute
togglePrimaryToSecondary
in interface PFieldBean
pri
- the primary currency IDsec
- the secondary currency IDnull
.RemoteException
public void revertToPrimary(int primary) throws RemoteException
revertToPrimary
in interface PComponentAttribute
revertToPrimary
in interface PFieldBean
primary
- the primary currency IDRemoteException
public void setLazyExpand(boolean doLazy)
doLazy
- the new value of this flagpublic boolean getLazyExpand()
public void valueChanged(TreeSelectionEvent e)
valueChanged
in interface TreeSelectionListener
e
- the new event that contains the data changepublic void addIASelectionListener(PIASelectionListener l)
public void removeIASelectionListener(PIASelectionListener l)
public void viewDataChange(PViewDataChangeEvent event) throws RemoteException
PViewDataChangeListener
. This method is
no longer called by the controller itself. To ensure backward compatibility,
it is called after the model is set, by any operation that causes a change in
the display data. The client code should call the appropriate
get()
methods on the controller to get the data, as the
PViewDataChangeEvent
parameter is no longer used.viewDataChange
in interface PViewDataChangeListener
event
- the PViewDataChangeEvent
event that
describes the change. No longer used. By default, the value
passed in is always set to null.RemoteException
- thrown for errorspublic void setSupportLocaleBasedFormat(boolean bSupported)
bSupported
- set to true to support node-based formattingpublic void unregister() throws RemoteException
unregister
in interface PClientComponent
RemoteException
Copyright © 2003, 2023, Oracle and/or its affiliates.