|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utk.cs.icl.rest.util.Location
edu.utk.cs.icl.rest.swing.LocInfo
A swing wrapper around util.location to provide the appropriate icons for the current status.
| Field Summary | |
static ImageIcon[] |
loc_icons
Icons used by the status. |
protected SwingPropertyChangeSupport |
locChanged
|
| Fields inherited from class edu.utk.cs.icl.rest.util.Location |
actions, badLocation, changed, commThread, DEFAULT_AUTH_GRP_NAME, DEFAULT_LOGICAL_GRP_NAME, groups, loc, LOC_ERROR, LOC_FINISHED, LOC_GENERAL, LOC_PROGRESS, LOC_WARNING, locGrp, message, pwdGrp, removed, uname |
| Constructor Summary | |
LocInfo(String location)
Creates a new instance of a location using the given string as the name. |
|
| Method Summary | |
boolean |
addAction(PackageAction action)
Add an action to be performed on this location |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this object. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Adds a PropertyChangeListener for a specific property.
|
static Color |
calcColor(String tmpName)
Deprecated. No longer used in favor of cycling through the colors as suggested by David Rogers. |
void |
finalize()
Cleanup any objects in the LocGroup that will not be automatically |
Color |
getBackground()
Get the locations background color. |
Color |
getForeground()
Get the foreground color. |
ImageIcon |
getIcon()
Returns the icon associated with the given object. |
DisplayItem |
getIconDisplayItem()
Get the current DisplayItem representing the status of this Location |
DisplayItem |
getIconDisplayItem(int which)
Get the specified DisplayItem and must be one of the defined Location class statuses |
DisplayItem |
getTextDisplayItem()
Get the Location toString() returned as a specified DisplayItem |
String |
getToolTipText()
Getter for property toolTipText. |
boolean |
isEnabled()
Getter for property enabled. |
boolean |
isOpaque()
Getter for property opaque. |
void |
propertyChange(PropertyChangeEvent evt)
Handle property changed events for this object on other objects this is a lister |
boolean |
removeAction(PackageAction action)
Remove an action from being performed on this location |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Removes a PropertyChangeListener for a specific property.
|
void |
setBackground(Color newColor)
Sets the background color of the location |
void |
setBadLocation(boolean badLocation)
Setter for property badLocation. |
void |
setChanged(boolean changed)
Setter for property changed. |
void |
setCommThread(Thread commThread)
Setter for property commThread. |
void |
setEnabled(boolean enabled)
Setter for property enabled. |
void |
setForeground(Color newColor)
Sets the foreground color of the location |
static void |
setHeadless(boolean b)
|
void |
setLocation(String location)
Set the hostname of the location from the given string. |
void |
setLocGrp(LocationGroup group)
Setter method for the locgrp field |
void |
setMessage(String message)
Setter for property message. |
void |
setOpaque(boolean opaque)
Setter for property opaque. |
void |
setPort(int port)
Setter method for the port field |
void |
setPwdGrp(LocationGroup group)
Setter method for the pwdgrp field |
void |
setRemoved(boolean removed)
Setter for property removed. |
void |
setStatus(int status)
Setter method for the location field. |
void |
setToolTipText()
Setter for property toolTipText. |
void |
setUserName(String username)
Setter method for the username field |
| Methods inherited from class edu.utk.cs.icl.rest.util.Location |
compareTo, equals, getActions, getCommThread, getGroups, getLocation, getLocGrp, getMessage, getPort, getPwdGrp, getShortLocation, getStatus, getUserName, hashCode, isBadLocation, isChanged, isRemoved, setActions, setGroups, toExternalform, toString |
| Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static ImageIcon[] loc_icons
protected SwingPropertyChangeSupport locChanged
| Constructor Detail |
public LocInfo(String location)
location - Name of the location| Method Detail |
public void setBackground(Color newColor)
newColor - New backgroundpublic Color getBackground()
public void setBadLocation(boolean badLocation)
setBadLocation in class LocationbadLocation - New value of property badLocation.public void setChanged(boolean changed)
setChanged in class Locationchanged - New value of property changed.public void setCommThread(Thread commThread)
setCommThread in class LocationcommThread - New value of property commThread.public void setEnabled(boolean enabled)
enabled - New value of property enabled.public void setForeground(Color newColor)
newColor - New foreground colorpublic Color getForeground()
public static void setHeadless(boolean b)
public ImageIcon getIcon()
public DisplayItem getIconDisplayItem()
public DisplayItem getIconDisplayItem(int which)
which - Selected status of the DisplayItem
public void setLocGrp(LocationGroup group)
setLocGrp in class Locationgroup - New location grouppublic void setLocation(String location)
setLocation in class Locationlocation - Hostname or ipaddress of the locationpublic void setMessage(String message)
setMessage in class Locationmessage - New value of property message.public void setOpaque(boolean opaque)
opaque - New value of property opaque.public boolean isOpaque()
public void setPort(int port)
setPort in class Locationport - New port for the locationpublic void setPwdGrp(LocationGroup group)
setPwdGrp in class Locationgroup - New password grouppublic void setRemoved(boolean removed)
setRemoved in class Locationremoved - New value of property removed.public void setStatus(int status)
setStatus in class Locationstatus - new status of the locationpublic DisplayItem getTextDisplayItem()
public void setToolTipText()
public String getToolTipText()
public void setUserName(String username)
setUserName in class Locationusername - New usernamepublic boolean addAction(PackageAction action)
addAction in class Locationaction - A new action to be performed on this location
public void addPropertyChangeListener(PropertyChangeListener listener)
listener - New listener
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
PropertyChangeListener for a specific property.
The listener will be invoked only when a call on
firePropertyChange names that specific property.
If listener is null, no exception is thrown and no
action is performed.
propertyName - the name of the property to listen onlistener - the PropertyChangeListener to be addedpublic static Color calcColor(String tmpName)
tmpName - Name to use to calculate the color
public boolean isEnabled()
public void finalize()
throws Throwable
Throwable - Requiredpublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerevt - Eventpublic boolean removeAction(PackageAction action)
removeAction in class Locationaction - Action to remove
PackageActionpublic void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener from the listener list.
This removes a PropertyChangeListener that was registered
for all properties.
listener - the PropertyChangeListener to be removed
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
PropertyChangeListener for a specific property.
If listener is null, no exception is thrown and no
action is performed.
propertyName - the name of the property that was listened onlistener - the PropertyChangeListener to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||