com.novell.admin.common.ui
Class AdminPage

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--com.novell.admin.common.ui.AdminPage
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable
Direct Known Subclasses:
MODObjectListPanel

public abstract class AdminPage
extends javax.swing.JPanel
implements java.beans.PropertyChangeListener

Base class for Admin pages. Classes that derive from this class must implement the abstract methods; checkRights, layoutControls, readData, saveData


Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
protected static int COMPONENT_CREATION_EXCEPTION
           
protected  InitSnapinInfo info
           
protected static int INVALID_METHOD_CALL_FOR_THIS_PAGESNAPIN
           
protected static int NAMESPACE_EXCEPTION
           
protected  NSObject nsObj
           
protected  AdminPageSnapin pageSnapin
           
protected  javax.swing.JFrame parentFrame
           
protected  PropertyBook propertyBook
           
protected  boolean read
           
protected  Shell shell
           
 
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
 
Constructor Summary
AdminPage(InitSnapinInfo snapinInfo, AdminPageSnapin snapin, NSObject obj)
          Constructor.
 
Method Summary
protected abstract  void checkRights()
          Checks for rights to edit attributes on this page.
protected  void fixFocus()
          This is a workaround for the bug where if you bring up a dialog over the mpec and then dismiss it, the focus goes back to the shell.
abstract  java.lang.String[] getHandledAttributeNames()
          Returns a String[] of all attributes that this page is going to take care of.
 java.awt.Insets getInsets()
          Method called by the Layout Manager to layout this page.
 boolean killActive()
          Called just before the page loses the focus.
protected abstract  void layoutControls()
          Lays out the UI components for this Page.
 void propertyChange(java.beans.PropertyChangeEvent e)
          PropertyChangeListener interface.
protected abstract  void readData()
          Reads the data from the NSObject and populates the controls.
abstract  boolean saveData()
          Queries each control to find out if they have been modified and then calls the appropriate method to actually do the write.
 void setActive(boolean isFirstTimeShown)
          Called just before the page is set as the current page.
 void shutdownSnapin()
          Called through the interface when the MPEC shuts down.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, 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, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parentFrame

protected javax.swing.JFrame parentFrame

shell

protected Shell shell

propertyBook

protected PropertyBook propertyBook

pageSnapin

protected AdminPageSnapin pageSnapin

info

protected InitSnapinInfo info

nsObj

protected NSObject nsObj

read

protected boolean read

NAMESPACE_EXCEPTION

protected static final int NAMESPACE_EXCEPTION

COMPONENT_CREATION_EXCEPTION

protected static final int COMPONENT_CREATION_EXCEPTION

INVALID_METHOD_CALL_FOR_THIS_PAGESNAPIN

protected static final int INVALID_METHOD_CALL_FOR_THIS_PAGESNAPIN
Constructor Detail

AdminPage

public AdminPage(InitSnapinInfo snapinInfo,
                 AdminPageSnapin snapin,
                 NSObject obj)
Constructor.
Parameters:
I-snapinInfo - The SnapinInf
I-snapin - The AdminPageSnapin
I-obj - The NSObject for this page.
Method Detail

setActive

public void setActive(boolean isFirstTimeShown)
Called just before the page is set as the current page.
Parameters:
I-isFirstTimeShown - true, if first time page is shown, false otherwise.

killActive

public boolean killActive()
Called just before the page loses the focus.
Returns:
true, if ok to leave this page, false otherwise.

getInsets

public java.awt.Insets getInsets()
Method called by the Layout Manager to layout this page.
Returns:
Insets The desired Insets
Overrides:
getInsets in class javax.swing.JComponent

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
PropertyChangeListener interface. Invoked when a change is made to the NSObject or any of its attributes. If this occurs, we just set the read bit to true.
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
I-e - The PropertyChangeEvent received.

shutdownSnapin

public void shutdownSnapin()
Called through the interface when the MPEC shuts down. Need to remove all listeners so they can be garbage collected.

fixFocus

protected void fixFocus()
This is a workaround for the bug where if you bring up a dialog over the mpec and then dismiss it, the focus goes back to the shell.

checkRights

protected abstract void checkRights()
                             throws SPIException
Checks for rights to edit attributes on this page.

layoutControls

protected abstract void layoutControls()
Lays out the UI components for this Page. IMPORTANT NOTE: You should in this method call pageSnapin.isMOD() if you have controls that need to be removed or disabled when running under MOD.

readData

protected abstract void readData()
Reads the data from the NSObject and populates the controls.

saveData

public abstract boolean saveData()
Queries each control to find out if they have been modified and then calls the appropriate method to actually do the write.

getHandledAttributeNames

public abstract java.lang.String[] getHandledAttributeNames()
Returns a String[] of all attributes that this page is going to take care of.
Returns:
Array of strings of attribute names.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.