|
Websphere MQ Everyplace | |||||||||
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 | +--examples.awt.AwtFrame | +--examples.administration.console.AdminFrame
To provide a simple window interface for managing WebSphere MQ Everywhere resources. Any resource to be managed should be implemented as a subclass of this class.
Nested Class Summary |
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected java.lang.String |
action
All admin requests are stored in admin messages |
protected java.awt.Button |
actionB
|
protected java.util.Hashtable |
actionFields
|
protected AdminModel |
adminModel
|
protected java.awt.Button |
applyB
|
protected java.awt.Button |
cancelB
|
protected java.util.Hashtable |
displayedFields
|
protected java.util.Hashtable |
displayFields
|
protected java.util.Hashtable |
displayFieldsGroups
|
protected java.util.Vector |
displayFieldsSeq
|
protected int |
fieldCount
|
protected MQeAdminMsg |
msg
|
protected java.util.Hashtable |
nLSFields
Information to help display resource |
protected MQeAdminMsg |
origMsg
|
static short[] |
version
|
Fields inherited from class examples.awt.AwtFrame |
borderLayout1, BorderWhere, Center, East, format, Menu, North, panel, South, West |
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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
AdminFrame()
Default constructor. |
|
AdminFrame(MQeAdminMsg msg,
int action,
AdminModel adminModel)
AdminFrame constructor. |
|
AdminFrame(java.lang.String title)
AdminFrame constructor. |
Method Summary | |
void |
action(java.lang.Object e,
int where,
int index,
java.lang.String choice,
boolean state)
Called to process an MQe awt event. |
void |
activate(MQeAdminMsg msg,
int action,
AdminModel adminModel)
Initialisation code. |
void |
addAction(java.lang.String actionName,
java.lang.String[][] actionParms)
Add details about an action. |
void |
addActionToDisplay(java.lang.String action)
Add an action to the display (frame). |
void |
addAlias()
Add any aliases related to this resource. |
void |
addCharacteristic(java.lang.String name,
java.lang.String displayWidget,
java.lang.String parent)
Add GUI properties for a field. |
void |
addDisplayedField(java.lang.String name,
java.lang.Object[] displayedAttrs)
Store information about a field that has been displayed. |
void |
addFieldToDisplay(java.lang.String name,
MQeFields baseFields,
MQeFields baseErrors)
Add a field to the display. |
void |
addNLSName(java.lang.String name,
java.lang.String nLSName)
Add an NLS name for a field. |
void |
close()
Close window. |
protected void |
closeFrame()
Handle window closing event. |
void |
display()
Show the frame. |
java.awt.Panel |
getActionsPanel(AwtEvent eventHandler)
Return an actions panel. |
MQeFields |
getChanges()
Get any fields which have changed or are mandatory. |
MQeFields |
getCharacteristics()
Get the set of characteristics for the managed object. |
java.lang.String[] |
getErrorFromFields(java.lang.String name,
MQeFields values,
MQeFields errors)
Get any errors for a named field. |
java.lang.String |
getField(java.lang.String name)
Get the value from the display of a named field. |
java.lang.String |
getFieldDisplayType(java.lang.String fieldName)
Return the name of the widget used to display the named field. |
java.lang.String[][] |
getFieldsForAction(java.lang.String action)
Return the set of fields for the named action. |
java.lang.String |
getMessageHelp()
Returns a string that provides information about the current frame. |
java.lang.String |
getNLSName(java.lang.String fieldName)
Return the NLS name for the named field. |
java.lang.String |
getResourceTitle()
Return the name of resource being managed. |
MQeFields |
getSubFields(java.lang.String name,
MQeFields baseFields)
Return embedded fields object for named field from the base fields object. |
java.lang.String[] |
getValueFromFields(java.lang.String name,
MQeFields fields)
Get the string value of a named field from within a fields object. |
boolean |
isFieldChanged(java.lang.String name)
Has the value of the field changed from its initial setting. |
void |
message(java.lang.String msg)
Display a message. |
boolean |
renderCharacteristic(java.lang.String name,
MQeFields fields,
MQeFields errors,
java.lang.String[] value,
java.lang.String[] error)
Handle rendering of a named field. |
void |
renderError(java.lang.String name,
MQeFields errors,
java.lang.String[] error,
boolean alreadyDisplayed)
Handle rendering of any errors related to a named field. |
void |
renderLabel(java.lang.String name)
Display the label for a field. |
void |
resourceAction(java.lang.Object e,
int where,
int index,
java.lang.String choice,
boolean state)
Process a queue manager action request. |
void |
setAdminModel(AdminModel am)
Sets the AdminModel. |
void |
setField(java.lang.String name,
MQeFields baseFields,
java.lang.String value)
Return embedded fields object for named field from the base fields object. |
MQeAdminMsg |
setupAction(MQeFields parms)
Setup the administration message with the action to be performed and the parameters required by the action. |
protected void |
setupActions()
Configure the valid set of actions for a particular type of resource. |
protected void |
setupFields()
Setup the set of characteristics for a particular type of resource. |
protected void |
setupNLS()
Setup NLS names for characteristics of a particular type of resource. |
boolean |
validateInput()
Validate the user's input. |
Methods inherited from class examples.awt.AwtFrame |
format, getActionIndex, getActionString, getCheckState, GetChoice, getObject, getPanel, getText, index, processWindowEvent, setPanel, setText, visible, visible |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, 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, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, 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, 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, isOpaque, 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, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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 short[] version
protected java.awt.Button cancelB
protected java.awt.Button applyB
protected java.awt.Button actionB
protected java.util.Hashtable nLSFields
protected java.util.Hashtable actionFields
protected java.util.Hashtable displayFields
protected java.util.Hashtable displayFieldsGroups
protected java.util.Vector displayFieldsSeq
protected java.util.Hashtable displayedFields
protected int fieldCount
protected java.lang.String action
protected MQeAdminMsg msg
protected MQeAdminMsg origMsg
protected AdminModel adminModel
Constructor Detail |
public AdminFrame()
public AdminFrame(MQeAdminMsg msg, int action, AdminModel adminModel) throws java.lang.Exception
msg
- An administration message to contain the parameters for the action.
If it already contains any parameters then these are taken as defaults.action
- The action to be performedradminModel
- The administration model which will send the message.
java.lang.Exception
public AdminFrame(java.lang.String title)
title
- java.lang.StringMethod Detail |
public void action(java.lang.Object e, int where, int index, java.lang.String choice, boolean state)
action
in interface AwtEvent
action
in class AwtFrame
e
- java.lang.Objectwhere
- An integer indicating the locationindex
- An integer containing the type of resource to be managedchoice
- java.lang.Stringstate
- A boolean
public void activate(MQeAdminMsg msg, int action, AdminModel adminModel) throws java.lang.Exception
msg
- com.ibm.mqe.MQeAdminMsgaction
- The action to be performedadminModel
- The administration model which will send the message.
java.lang.Exception
public void addAction(java.lang.String actionName, java.lang.String[][] actionParms)
actionName
- Name of the actionactionParms
- :
1st dimension : fields required for action 2nd dimension : information related to each field "M" = mandatory completion "O" = optional input
Example:
addAction( new String().valueOf(MQeQueueManagerAdminMsg.Action_Update), new String[][] { { MQeQueueManagerAdminMsg.Name, "M" }, { MQeQueueManagerAdminMsg.Desc, "O" } }; );
public void addActionToDisplay(java.lang.String action) throws java.lang.Exception
action
- String containing the action to be performed.
java.lang.Exception
public void addAlias() throws java.lang.Exception
java.lang.Exception
public void addCharacteristic(java.lang.String name, java.lang.String displayWidget, java.lang.String parent)
name
- name of fielddisplayWidget
- how to display the fieldparent
- name of this fields parent (container)
Note: the sequence of addCharacteristic calls determines the sequence that fields are displayed.
Example :
addCharacteristic( MQeQueueManagerAdminMsg.Name, "TF", null ); addCharacteristic( MQeQueueManagerAdminMsg.Routes, "C", null ); addCharacteristic( MQeQueueManagerAdminMsg.RouteDestination, "TF", MQeQueueManagerAdminMsg.Routes );
public void addDisplayedField(java.lang.String name, java.lang.Object[] displayedAttrs)
name
- name of fielddisplayedAttrs
- :
[0] - GUI widget [1] - initial value [2] - field type
public void addFieldToDisplay(java.lang.String name, MQeFields baseFields, MQeFields baseErrors) throws java.lang.Exception
name
- Name of the fieldbaseFields
- MQeFields ObjectbaseErrors
- MQeFields Object
java.lang.Exception
public void addNLSName(java.lang.String name, java.lang.String nLSName)
name
- Name of the fieldnLSName
- String containing the NLSName for the field
public void close()
protected void closeFrame()
closeFrame
in class AwtFrame
public void display()
public java.awt.Panel getActionsPanel(AwtEvent eventHandler)
eventHandler
- An AwtEvent
public MQeFields getChanges() throws java.lang.Exception
java.lang.Exception
public MQeFields getCharacteristics() throws java.lang.Exception
java.lang.Exception
public java.lang.String[] getErrorFromFields(java.lang.String name, MQeFields values, MQeFields errors) throws java.lang.Exception
name
- Name of the fieldvalues
- MQeFields objecterrors
- MQeFields object
java.lang.Exception
public java.lang.String getField(java.lang.String name) throws java.lang.Exception
name
- Name of the field
java.lang.Exception
public java.lang.String getFieldDisplayType(java.lang.String fieldName)
fieldName
- Name of the field
public java.lang.String[][] getFieldsForAction(java.lang.String action)
action
- The action to be performed
public java.lang.String getNLSName(java.lang.String fieldName)
public java.lang.String getResourceTitle()
public MQeFields getSubFields(java.lang.String name, MQeFields baseFields) throws java.lang.Exception
java.lang.Exception
public java.lang.String[] getValueFromFields(java.lang.String name, MQeFields fields) throws java.lang.Exception
java.lang.Exception
public boolean isFieldChanged(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void message(java.lang.String msg)
msg
- String containing the message to be displayed.
public boolean renderCharacteristic(java.lang.String name, MQeFields fields, MQeFields errors, java.lang.String[] value, java.lang.String[] error) throws java.lang.Exception
name
- Name of the fieldfields
- MQeFields objecterrors
- MQeFields objectvalue
- A String arrayerror
- A String array
java.lang.Exception
public void renderError(java.lang.String name, MQeFields errors, java.lang.String[] error, boolean alreadyDisplayed) throws java.lang.Exception
name
- Name of the fielderrors
- MQeFields objecterror
- A String arrayalreadyDisplayed
- A boolean
java.lang.Exception
public void renderLabel(java.lang.String name)
name
- Name of the field
public void resourceAction(java.lang.Object e, int where, int index, java.lang.String choice, boolean state) throws java.lang.Exception
e
- java.lang.Objectwhere
- An integer indicating the locationindex
- An integer containing the type of resource to be managedchoice
- java.lang.Stringstate
- A boolean
java.lang.Exception
public void setAdminModel(AdminModel am)
am
- AdminModel object
public void setField(java.lang.String name, MQeFields baseFields, java.lang.String value) throws java.lang.Exception
Return embedded fields object for named field from the base fields object.
MQeFields objects can contain other fields objects. This method returns the fields object that owns a named field from within the root fields object.
name
- Name of the fieldbaseFields
- MQeFields objectvalue
- java.lang.String
java.lang.Exception
public MQeAdminMsg setupAction(MQeFields parms) throws java.lang.Exception
parms
- MQeFields object
java.lang.Exception
protected void setupActions()
protected void setupFields()
protected void setupNLS()
public boolean validateInput() throws java.lang.Exception
java.lang.Exception
public java.lang.String getMessageHelp()
|
Websphere MQ Everyplace | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |