|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel issrg.editor2.AbstractTreePolicies
public abstract class AbstractTreePolicies
Abstract Class for the use of the last two sub policy editors
RoleAssignmentPolicy
and TargetAccessPolicy
.
These last two sub policies, have a similar GUI, and functionality.
This class provides the how they work and their main display.
Each sub-policy that extends this class will need to specify their own panels they want to display inside the space allocated in this one.
TargetAccessPolicy
,
RoleAssignmentPolicy
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
int |
count
|
javax.swing.JSplitPane |
splitPane
|
javax.swing.JPanel |
topPaneltoDisplay
|
ReadablePERMISXML |
viewXML
The Readable XML policy Component |
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.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 | |
---|---|
AbstractTreePolicies(PEComponent that)
|
|
AbstractTreePolicies(PEComponent that,
java.lang.String policyRoot,
java.lang.String policyTag)
Calls getContentPanel() to specify how the main gui interface is for this type of classes. |
|
AbstractTreePolicies(XMLEditor that,
java.lang.String policyRoot,
java.lang.String policyTag)
|
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ev)
Handles the events in the case when a button (add/delete) was pressed and calls their respective methods. |
void |
addPanel()
Method that will add the relevant sectional XML. |
abstract void |
deletePanel()
Abstract method to delete the relevant sectional XML. |
abstract java.lang.String[] |
getChildNodesToAdd()
As each sub-policy will be adding different tags, this abstract String array will contain the names of the tags to be added. |
void |
getContentPanel()
Creates the main gui for this component, and sets everything together. |
java.lang.Object |
getRoot()
This method, will return an object (that can be cast to Element or Node) which is the 'root' element of the sub-policy, that has been passed to the constructor as a String. |
javax.swing.JPanel |
getTopPanel()
This constructs the north JPanel that this component will display. |
void |
initSettings()
|
boolean |
isTabName(java.lang.String str)
|
abstract void |
refreshPanel(XMLChangeEvent ev)
Abstract method to refresh the topPanel as each sub-policy will have its own requirements on what to refresh. |
void |
setCaption(java.lang.String internalName,
java.lang.String internationalName)
Sets the text the component will show. |
void |
XMLChanged(XMLChangeEvent ev)
As a registered XMLChangeListener, when an event is received it will call the method refreshPanel() to update the contents of its composing components. |
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, 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 |
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, 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 |
---|
public int count
public ReadablePERMISXML viewXML
public javax.swing.JSplitPane splitPane
public javax.swing.JPanel topPaneltoDisplay
Constructor Detail |
---|
public AbstractTreePolicies(PEComponent that, java.lang.String policyRoot, java.lang.String policyTag)
that
- the XML Editor Reference.policyRoot
- the sub-policy 'Root' Element.policyTag
- the Element that the class will be modifying.public AbstractTreePolicies(XMLEditor that, java.lang.String policyRoot, java.lang.String policyTag)
public AbstractTreePolicies(PEComponent that)
Method Detail |
---|
public void initSettings()
public void getContentPanel()
Since it uses a border layout the main XML editing will be as usual in the NORTH section of the panel, whilst to the south the component will display the readable XML policy.
Between the North & South panels is a splitpane so that the user could toggle between the two.
public javax.swing.JPanel getTopPanel()
This idea is that this panel consists of a JTabbedPane, of which
each sub-policy that uses this class will have his own. Therefore an
empty JPanel (treePanel) is placed for future use.
It will also consist of 2 Buttons that are placed to add or delete the
amount of tabs that are displayed.
public abstract java.lang.String[] getChildNodesToAdd()
public void setCaption(java.lang.String internalName, java.lang.String internationalName)
internalName
- The internal name used in the program.internationalName
- The international name to set the text to.public void XMLChanged(XMLChangeEvent ev)
XMLChanged
in interface XMLChangeListener
public void actionPerformed(java.awt.event.ActionEvent ev)
actionPerformed
in interface java.awt.event.ActionListener
public void addPanel()
The reasoning is that when the XMLChangeEvent is detected, the other classes that handle the displaying of the JTabbedPane, will loop through the sections of XML of interest, and will then assume how many tabs to display.
public boolean isTabName(java.lang.String str)
public abstract void deletePanel()
public abstract void refreshPanel(XMLChangeEvent ev)
public java.lang.Object getRoot()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |