public abstract class RightsComponent
extends javax.swing.JPanel
,
Serialized FormModifier and Type | Class and Description |
---|---|
protected class |
RightsComponent.ACLGroupIDComparator
The right acl group id comparator.
|
protected class |
RightsComponent.ACLGroupNameComparator
The right acl group name comparator.
|
protected class |
RightsComponent.GroupsListModel
The group list model
|
protected class |
RightsComponent.IDComparator
The T_LONGLONG ID comparator.
|
protected class |
RightsComponent.IDSortComparator
The T_LONGLONG ID sort comparator.
|
protected class |
RightsComponent.ListMouseListener
The list mouse listener.
|
protected class |
RightsComponent.RightGroupIDComparator
The right group id comparator.
|
protected class |
RightsComponent.RightGroupNameComparator
The right group name comparator.
|
protected class |
RightsComponent.RightsTableModel
The table model.
|
protected class |
RightsComponent.TableCellRenderer
The table cell renderer
|
protected class |
RightsComponent.TableMouseListener
The table mouse listener.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected RightsComponent.ACLGroupIDComparator |
aclGroupIdComparator |
protected RightsComponent.ACLGroupNameComparator |
aclGroupNameComparator |
protected javax.swing.Action |
addRoles |
protected T_LONGLONG |
aeID |
protected java.lang.String |
borderTitle |
protected javax.swing.Action |
deleteRights |
protected OdsxSelectHelper.NameId[] |
groups |
protected RightsComponent.IDComparator |
idComparator |
protected java.lang.Integer[] |
idSort |
protected RightsComponent.IDSortComparator |
idSortComparator |
protected javax.swing.JList |
list |
protected javax.swing.JPopupMenu |
listPopup |
protected int |
makesSense |
protected boolean |
readOnlyMode |
protected static java.util.HashMap |
RIGHT_STRINGS |
protected RightsComponent.RightGroupIDComparator |
rightGroupIdComparator |
protected RightsComponent.RightGroupNameComparator |
rightGroupNameComparator |
protected java.lang.String |
roleTitle |
protected javax.swing.JSplitPane |
splitter |
protected javax.swing.JTable |
table |
protected javax.swing.JPopupMenu |
tablePopup |
protected javax.swing.JPanel |
tPanel |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
RightsComponent(OdsxSelectHelper.NameId[] groups,
int makesSense,
java.lang.String roleTitle)
Creates a new instance of SecurityLevelComponent
|
Modifier and Type | Method and Description |
---|---|
void |
addNewRoles()
Add the selected role from list to rights table.
|
protected abstract void |
addRightsForRoles(T_LONGLONG[] id,
T_LONGLONG refAId)
Add rights for role.
|
ACL |
cloneACL(ACL rights)
clone a rights structure.
|
InitialRight |
cloneRight(InitialRight rights)
clone a rights structure.
|
protected javax.swing.JPanel |
createButtonPanel(boolean space,
javax.swing.JButton[] arr)
Create a button panel.
|
javax.swing.JPopupMenu |
createListPopup()
Create the list popup menu.
|
protected void |
createPanel()
Create the panel content.
|
javax.swing.JPopupMenu |
createTablePopup()
Create the list popup menu.
|
void |
deleteRights()
Delete selected rights from rights table.
|
protected abstract void |
deleteRights(int[] idx)
Delete rights.
|
abstract int |
findRightsForGroup(T_LONGLONG id)
Find rights index using the group id.
|
T_LONGLONG |
getAeID()
get the current refAID
|
abstract java.lang.String |
getBorderTitle()
get the border title.
|
protected OdsxSelectHelper.NameId |
getGroupForId(T_LONGLONG id)
Get the group belong to the given id.
|
protected java.lang.String |
getGroupName(OdsxSelectHelper.NameId group)
Get the group name belong to the given id.
|
protected java.lang.String |
getGroupName(T_LONGLONG id)
Get the group name belong to the given id.
|
javax.swing.JPopupMenu |
getListPopup()
Get the list popup menu.
|
abstract java.lang.String |
getRightsGroupName(int idx)
Get the group name belongs to a right
|
abstract int |
getRightsLength()
Get the total number of available rights.
|
java.lang.String |
getRightString(int right)
Get a right string
|
abstract int |
getRightsValue(int idx)
Get the right value belongs to right.
|
javax.swing.JPopupMenu |
getTablePopup()
Get the table popup menu.
|
boolean |
hasRight(int rights,
int right)
Has right
|
void |
initialize()
Initialize the component.
|
boolean |
makesSense(int right)
Make the current right sense?
|
void |
setAeID(T_LONGLONG aeID)
Set the RefAID
|
void |
setBorderTitle(java.lang.String borderTitle)
Set the border title.
|
protected void |
setGroups(OdsxSelectHelper.NameId[] groups)
Set the all over existing group array.
|
abstract void |
setRightsValue(int idx,
int rights)
Set the right value belongs to right.
|
void |
setSensitivity()
Set the action sensitity.
|
protected void |
sort()
Sort the internal arrays.
|
int |
toggleRight(int rights,
int right)
Toogle right
|
void |
updateUI()
Repaint the component.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI
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, 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 static java.util.HashMap RIGHT_STRINGS
protected OdsxSelectHelper.NameId[] groups
protected java.lang.Integer[] idSort
protected RightsComponent.IDComparator idComparator
protected RightsComponent.RightGroupNameComparator rightGroupNameComparator
protected RightsComponent.RightGroupIDComparator rightGroupIdComparator
protected RightsComponent.ACLGroupNameComparator aclGroupNameComparator
protected RightsComponent.ACLGroupIDComparator aclGroupIdComparator
protected RightsComponent.IDSortComparator idSortComparator
protected javax.swing.JTable table
protected javax.swing.JPopupMenu tablePopup
protected javax.swing.JList list
protected javax.swing.JPopupMenu listPopup
protected javax.swing.JSplitPane splitter
protected javax.swing.Action addRoles
protected javax.swing.Action deleteRights
protected java.lang.String borderTitle
protected java.lang.String roleTitle
protected int makesSense
protected javax.swing.JPanel tPanel
protected T_LONGLONG aeID
protected boolean readOnlyMode
public RightsComponent(OdsxSelectHelper.NameId[] groups, int makesSense, java.lang.String roleTitle)
groups
- a list of available user groups.roleTitle
- the tile of the role listbox.public void updateUI()
updateUI
in class javax.swing.JPanel
public void initialize()
protected void createPanel()
protected javax.swing.JPanel createButtonPanel(boolean space, javax.swing.JButton[] arr)
public javax.swing.JPopupMenu getListPopup()
public javax.swing.JPopupMenu createListPopup()
public javax.swing.JPopupMenu getTablePopup()
public javax.swing.JPopupMenu createTablePopup()
public void setSensitivity()
protected void setGroups(OdsxSelectHelper.NameId[] groups)
protected void sort()
protected java.lang.String getGroupName(T_LONGLONG id)
protected java.lang.String getGroupName(OdsxSelectHelper.NameId group)
protected OdsxSelectHelper.NameId getGroupForId(T_LONGLONG id)
public boolean makesSense(int right)
public boolean hasRight(int rights, int right)
public int toggleRight(int rights, int right)
public java.lang.String getRightString(int right)
public InitialRight cloneRight(InitialRight rights)
public void deleteRights()
public void addNewRoles()
public abstract int getRightsLength()
public abstract java.lang.String getRightsGroupName(int idx)
public abstract int getRightsValue(int idx)
public abstract void setRightsValue(int idx, int rights)
public abstract int findRightsForGroup(T_LONGLONG id)
protected abstract void addRightsForRoles(T_LONGLONG[] id, T_LONGLONG refAId)
protected abstract void deleteRights(int[] idx)
public abstract java.lang.String getBorderTitle()
public void setBorderTitle(java.lang.String borderTitle)
public T_LONGLONG getAeID()
public void setAeID(T_LONGLONG aeID)
aeID
- the new refAID