|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
wt.clients.beans.EffectivityPanel
public class EffectivityPanel
This bean is used to create, update, or view effectivity
for an EffectivityManageable object. The
following is an example of how to use the EffectivityPanel:
effectivityPanel1 = new wt.clients.beans.EffectivityPanel();
try {
effectivityPanel1.setMode("Edit");
}
catch(java.beans.PropertyVetoException e) { }
effectivityPanel1.setBounds(0,0,415,75);
effectivityPanel1.setFont(new Font("Dialog", Font.PLAIN, 11));
effectivityPanel1.setForeground(new Color(0));
effectivityPanel1.setBackground(new Color(12632256));
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.gridwidth = 2;
gbc.weightx = 1.0;
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.insets = new Insets(0,0,0,0);
((GridBagLayout)panel1.getLayout()).setConstraints(effectivityPanel1, gbc);
panel1.add(effectivityPanel1);
effectivityPanel1.addHelpListener(helpListener);
effectivityPanel1.setObject(em);
if (effectivityPanel1.isDirty()) {
effectivityPanel1.save();
}
Supported API: true.
Extendable: true.
| Nested Class Summary | |
|---|---|
class |
EffectivityPanel.ConfigItemListener
This class listens for the user to select a ConfigurationItem and adds it to the
configItemTextField. |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| 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 | |
|---|---|
EffectivityPanel()
This constructs an EffectivityPanel with
the default mode of view. |
|
| Method Summary | |
|---|---|
void |
addHelpListener(PropertyChangeListener pcl)
Method addHelpListener adds the given listener to be notified
of PropertyChangeEvents in the help system. |
protected void |
addViewFields()
this adds the fields for view mode and removes the fields for edit mode Supported API: true. |
wt.effectivity.Effectivity |
assignValues()
This method will set the values of the Effectivity
from the user's entry. |
void |
clear()
This clears the fields Supported API: true. |
protected void |
createUI()
This adds or removes fields based on the mode Supported API: true. |
protected void |
createViewFields()
this creates the fields for view mode Supported API: true. |
protected void |
displayException(Exception e)
This displays an exception to the user and prints out a stack trace. |
Color |
getBackground()
This will get the background color of this panel Supported API: true. |
wt.effectivity.Effectivity |
getEffectivity()
This method returns the Effectivity currently
assigned to the EffectivityManageable object. |
Font |
getFont()
This will get the font color of this panel Supported API: true. |
Color |
getForeground()
This will get the foreground color of this panel Supported API: true. |
HelpContext |
getHelpContext()
This is a public accessor for the current HelpContext
and can be used to stop the help for the bean when the client
is closed. |
HelpSystem |
getHelpSystem()
This is a public accessor for the current HelpSystem
Supported API: true. |
Dimension |
getMinimumSize()
This overrides the minimum size for the bean. |
Dimension |
getMinimumSize(int rows,
int cols)
This overrides the minimum size for the bean. |
String |
getMode()
This is the public accessor for the current mode of the bean. |
wt.effectivity.EffectivityManageable |
getObject()
This is the public getter for the EffectivityManageable
object for which the Effectivity is being
edited or viewed. |
wt.effectivity.Effectivity |
getOldEffectivity()
This is the public getter for the Effectivity
that is deleted. |
Dimension |
getPreferredSize()
This overrides the preferred size for the bean. |
Dimension |
getPreferredSize(int rows,
int cols)
This overrides the preferred size for the bean. |
boolean |
isDirty()
Call this method to determine if the user has changed any of the fields on the bean. |
protected void |
localize()
This sets the display text of the fields to the localized string from the resource bundle. |
void |
removeHelpListener(PropertyChangeListener pcl)
Method removeHelpListener removes a listener which was being
notified of PropertyChangeEvents in the help system. |
protected void |
removeViewFields()
this removes the fields for view mode and adds the fields for edit mode Supported API: true. |
void |
requestFocus()
Invoking requestFocus on this panel
will set the focus on the appropriate field in this panel. |
void |
save()
This method will update the Effectivity with
the user's input and persist it. |
void |
save(Enumeration effectivities,
Enumeration old_effectivities)
This method takes Enumerations of effectivities
and will store the new Effectivities and
remove the old. |
void |
setBackground(Color color)
This will set the background color of this panel Supported API: true. |
protected void |
setEditValues()
This sets the values of the fields for editing. |
void |
setEnabled(boolean b)
This will set the state of each component within the bean to either enabled or disabled based on the boolean passed in. |
protected void |
setFieldState(boolean b,
Container container)
This sets the fields to either editable or enabled depending on the boolean and the type of component. |
void |
setFont(Font font)
This will set the font color of this panel Supported API: true. |
void |
setForeground(Color color)
This will set the foreground color of this panel Supported API: true. |
void |
setMode(String mode)
This sets the mode of the bean to Edit or View and modifies the fields accordingly. |
void |
setObject(wt.effectivity.EffectivityManageable object)
Use this method to set the EffectivityManageable
object for which the Effectivity will be edited
or viewed. |
void |
setObject(wt.effectivity.EffectivityManageable object,
wt.effectivity.Effectivity new_effectivity)
Use this method to assign an already created Effectivity
to an EffectivityManageable. |
void |
setParentApplet(Applet applet)
Set the Applet that started this panel Supported API: true. |
void |
setParentFrame(Frame frame)
Set the parent Frame that started this panel Supported API: true. |
protected void |
setViewValues()
This displays the values for the effectivity to the user Supported API: true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EffectivityPanel()
EffectivityPanel with
the default mode of view.
| Method Detail |
|---|
protected void localize()
public void setMode(String mode)
throws PropertyVetoException
PropertyVetoExceptionpublic String getMode()
public Dimension getPreferredSize()
getPreferredSize in class Container
public Dimension getPreferredSize(int rows,
int cols)
public Dimension getMinimumSize()
getMinimumSize in class Container
public Dimension getMinimumSize(int rows,
int cols)
public void setForeground(Color color)
setForeground in class Componentpublic Color getForeground()
getForeground in class Componentpublic void setBackground(Color color)
setBackground in class Componentpublic Color getBackground()
getBackground in class Componentpublic void setFont(Font font)
setFont in class Containerpublic Font getFont()
getFont in interface MenuContainergetFont in class Componentpublic void setEnabled(boolean b)
setEnabled in class Componentb - - Sets all fields to enabled when truepublic void clear()
protected void displayException(Exception e)
public HelpContext getHelpContext()
HelpContext
and can be used to stop the help for the bean when the client
is closed.
public HelpSystem getHelpSystem()
HelpSystem
public void addHelpListener(PropertyChangeListener pcl)
addHelpListener adds the given listener to be notified
of PropertyChangeEvents in the help system. Tool description
PropertyChangeEvents are generated when the user mouses over
the buttons and list of ContentItems in this panel. The
given listener will be notified of those events.
pcl - The PropertyChangeListener to be notified of
PropertyChangeEvents generated by the help system.removeHelpListener(java.beans.PropertyChangeListener),
HelpSystem,
HelpContext,
PropertyChangeListenerpublic void removeHelpListener(PropertyChangeListener pcl)
removeHelpListener removes a listener which was being
notified of PropertyChangeEvents in the help system. If
the given listener is not currently a listener, no changes are made.
pcl - the PropertyChangeListener to be removed as a
listener of events generated by the help system of this panel.addHelpListener(java.beans.PropertyChangeListener),
PropertyChangeListener
protected void setFieldState(boolean b,
Container container)
protected void createUI()
protected void setViewValues()
protected void setEditValues()
protected void addViewFields()
protected void removeViewFields()
protected void createViewFields()
public void setObject(wt.effectivity.EffectivityManageable object)
throws WTException
EffectivityManageable
object for which the Effectivity will be edited
or viewed.
WTException
public void setObject(wt.effectivity.EffectivityManageable object,
wt.effectivity.Effectivity new_effectivity)
throws WTException
Effectivity
to an EffectivityManageable.
WTExceptionpublic wt.effectivity.EffectivityManageable getObject()
EffectivityManageable
object for which the Effectivity is being
edited or viewed.
public wt.effectivity.Effectivity assignValues()
throws WTPropertyVetoException,
WTException
Effectivity
from the user's entry.
WTPropertyVetoException
WTException
public void save()
throws WTPropertyVetoException,
WTException
Effectivity with
the user's input and persist it.
WTPropertyVetoException
WTException
public void save(Enumeration effectivities,
Enumeration old_effectivities)
throws WTException
Enumerations of effectivities
and will store the new Effectivities and
remove the old.
WTExceptionpublic boolean isDirty()
public wt.effectivity.Effectivity getEffectivity()
Effectivity currently
assigned to the EffectivityManageable object.
public wt.effectivity.Effectivity getOldEffectivity()
Effectivity
that is deleted.
public void setParentApplet(Applet applet)
public void setParentFrame(Frame frame)
public void requestFocus()
requestFocus on this panel
will set the focus on the appropriate field in this panel.
requestFocus in class Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||