|
|||||||||
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 java.awt.Window java.awt.Frame javax.swing.JFrame issrg.editor2.PEApplication
public class PEApplication
PEApplication Class. The main Class with all its Main Methods. The main window extends a JFrame, and the subpolicies are in turn implemented in JInternalFrames. This Main Class mainly acts as a loader that puts the menus in place, and loads all labels from the PEApplication resource bundle. The menu buttons are in turn added to their respective listeners to perform the methods when clicked.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
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 | |
---|---|
static ConfigurationComponent |
configComponent
|
javax.swing.JDesktopPane |
desktop
|
static ErrorLogger |
errorLogger
|
static OptionsDialog |
ldapConfigWin
Creates a new instance of the OptionsDialog. |
int |
newPolicyWindow
|
static PEApplication |
pea
|
javax.swing.JPanel |
statusBar
|
static Version |
version
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
PEApplication()
Constructor creating a new Application window workbench. |
Method Summary | |
---|---|
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
void |
create_about()
|
void |
create_exit()
Method called to ensure successful exit of the application. |
void |
create_ldapDialog()
|
void |
create_pemanual()
|
void |
create_pemanualFont()
|
void |
create_policy(boolean choosePolicy,
java.lang.String types)
Method to create or load a policy. |
void |
create_policyViewer()
On obtaining the Active open and focused policy, this methd will call the method to create a policy viewer and display the xml file and the readable policy side by side. |
void |
create_printreadablepolicy()
On obtaining the Active open and focussed policy, this will call the print Readable Policy method. |
void |
create_printxml()
On obtaining the Active open and focussed policy, this will call the print XML method. |
void |
create_readablepolicy()
On obtaining the Active open and focussed policy, this method will call the method to create a window and display the human readable policy inside it. |
void |
create_redo()
On obtaining the Active open and focussed policy, this method will call the method to redo. |
void |
create_save_dialog(PECFrame pecf)
Used to check whether the Policy Editor window is saved or not when it has been closed. |
boolean |
create_save(boolean show_dialog)
Saves Current Policy Editor Component according to Flag. |
void |
create_signandpublish()
|
void |
create_text()
|
void |
create_undo()
On obtaining the Active open and focussed policy, this method will call the method to undo. |
void |
create_validate()
|
void |
create_wizzard()
|
void |
create_xml()
On obtaining the Active open and focussed policy, this method will call the method to create a window and display the XML inside the newly opened window. |
void |
createGUI()
Creates the GUI for the main application. |
javax.swing.JInternalFrame |
createInternalFrame(javax.swing.JFrame f,
java.lang.String s)
|
PECFrame |
getActivePECF()
This method returns the current active policy window, if any. |
static ConfigurationComponent |
getConfiguration()
|
void |
importPolicyFromXMLEditor(XMLEditor policyDocument)
|
static void |
main(java.lang.String[] args)
The Main method sets the look and feel of the application. |
void |
openFromLDAP()
|
void |
openFromWebDAV()
|
void |
prepareStatusBar()
|
void |
readLabels(java.lang.String filename)
Label Loader Method. |
void |
updateGUI(XMLEditor xmlED)
This method is called to update the GUI, when there has been any modifications to a policy. |
void |
updateXValue()
|
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowGainedFocus(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowLostFocus(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
void |
windowStateChanged(java.awt.event.WindowEvent e)
|
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static PEApplication pea
public javax.swing.JDesktopPane desktop
public javax.swing.JPanel statusBar
public int newPolicyWindow
public static final Version version
public static ConfigurationComponent configComponent
public static ErrorLogger errorLogger
public static OptionsDialog ldapConfigWin
Constructor Detail |
---|
public PEApplication()
All the labels required for the applications main window will be loaded using the readLabels. The File Path specified will be the one in which the .properties resource bundle file will be searched.
This the Creates the GUI as we need it to appear. A JDesktopPane with a menubar, containing all the application options.
Method Detail |
---|
public void prepareStatusBar()
public void updateGUI(XMLEditor xmlED)
public PECFrame getActivePECF()
public void create_policy(boolean choosePolicy, java.lang.String types)
This method will then do the modifications to the main Application window gui
choosePolicy
- True to open an existing file || False to create.public void importPolicyFromXMLEditor(XMLEditor policyDocument)
public void updateXValue()
public void openFromLDAP()
public void openFromWebDAV()
public boolean create_save(boolean show_dialog)
show_dialog
- When true it will show the file dialog in order to be able
to enter a new file name to Save As. When false it will
execute the Save procedure.public void create_save_dialog(PECFrame pecf)
If the Policy was Saved before closing, the window will just close.
Otherwise, the Policy has not been Saved before closing, and the method then checks if the policy has a file name or not. If the Policy does not have a file name, the Save As procedure is launched, otherwise if the policy has a filename the application will prompt the user with a 3 answer dialog: Yes, No, Cancel. If the user hits 'Yes' the file will overwrite the previous file and the closingSuccessful flag is set to True. If the user hits 'No' the changes will be discarded and the closingSuccessful flag is set to True. Otherwise when the user hits cancel, the changes and policy window will remain open, and the closingSuccessful flag is set to False.
pecf
- The policy window that has just been shut.public void create_printxml()
public void create_printreadablepolicy()
public void create_exit()
public void create_undo()
public void create_redo()
public void create_xml()
public void create_readablepolicy()
public void create_policyViewer()
public void create_validate()
public void create_signandpublish()
public void create_ldapDialog()
public void create_pemanual()
public void create_pemanualFont()
public void create_about()
public void create_wizzard()
public void create_text()
public javax.swing.JInternalFrame createInternalFrame(javax.swing.JFrame f, java.lang.String s)
public void createGUI()
public void readLabels(java.lang.String filename)
The Label Names are loaded from filename. The Required Strings are then filled in with their referenced name in the resource bundle.
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowGainedFocus(java.awt.event.WindowEvent e)
public void windowLostFocus(java.awt.event.WindowEvent e)
public void windowStateChanged(java.awt.event.WindowEvent e)
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public static ConfigurationComponent getConfiguration()
public static void main(java.lang.String[] args)
The main method will then create an instance of the PEApplication.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |