Package com.portal.bas
Class PComponentAttributeImpl
java.lang.Object
com.portal.bas.PComponentAttributeImpl
- All Implemented Interfaces:
Serializable
PComponentAttributeImpl
is the default implementation class for
the PComponentAttribute
interface. Its design allows any other
implementation of this interface to delegate some or all of its methods to an
instance of this class.- Version:
- %version: 7 % %date_modified: Fri Sep 28 10:38:33 2001 %
- Author:
- kapono
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of this class, given a parent component. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears existing data from the component.Gets the default value.int
Gets the default count.boolean
Determines whether the component currently displays currency data.boolean
isDirty()
Tests to determine whether this is a changed field.boolean
isError()
Tests to determine if this has bad data.boolean
Tests the input tracking flag.boolean
Tests to determine whether this is a required field.void
Resets the component value to the original value, which was established by callingsetDefault()
.setClean()
Sets the state to CLEAN, unless the field is required, at which time the state will be both CLEAN and REQUIRED.void
setCurrencyDisplay
(boolean b) Determines if this component currently displays currency data.void
setDefault
(Object obj) Sets the default value.void
setDefaultCount
(int cnt) Sets the default count.setDirty()
Sets the DIRTY flag in this field to indicate a change and calculates the new field color.setError
(boolean b) Sets the ERROR flag in this field and calculates the new field color.void
setInputTracking
(boolean b) Sets the input tracking flag.setRequired
(boolean b) Sets the REQUIRED flag in this field and calculates the new field color.
-
Constructor Details
-
PComponentAttributeImpl
Creates an instance of this class, given a parent component.- Parameters:
comp
- the component that will be given a set of attributes- Throws:
RemoteException
- thrown for all problems
-
-
Method Details
-
resetToDefault
public void resetToDefault()Resets the component value to the original value, which was established by callingsetDefault()
. If no default value exists, the component data is cleared. This method simply sets the state to CLEAN. The subclass retrieves the default value, if any, and resets the value. -
clear
public void clear()Clears existing data from the component. The subclass actually clears the data from a given component. -
setClean
Sets the state to CLEAN, unless the field is required, at which time the state will be both CLEAN and REQUIRED. Calculates the new field color.- Returns:
- The new field color.
-
isRequired
public boolean isRequired()Tests to determine whether this is a required field.- Returns:
- True if required; false otherwise.
-
setRequired
Sets the REQUIRED flag in this field and calculates the new field color.- Parameters:
b
- true if required; false otherwise- Returns:
- The new field color.
-
setDirty
Sets the DIRTY flag in this field to indicate a change and calculates the new field color.- Returns:
- The new field color.
-
isDirty
public boolean isDirty()Tests to determine whether this is a changed field.- Returns:
- True if changed; false otherwise.
-
isError
public boolean isError()Tests to determine if this has bad data.- Returns:
- True if contents are in error; false otherwise.
-
setError
Sets the ERROR flag in this field and calculates the new field color.- Parameters:
b
- true if the field is in error; false otherwise- Returns:
- The new field color.
-
setDefaultCount
public void setDefaultCount(int cnt) Sets the default count.- Parameters:
cnt
- the new default count
-
getDefaultCount
public int getDefaultCount()Gets the default count.- Returns:
- The default count.
-
setDefault
Sets the default value.- Parameters:
obj
- the default object. Used for comparison purposes; it doesn't change the current contents.
-
getDefault
Gets the default value.- Returns:
- The default value.
-
setInputTracking
public void setInputTracking(boolean b) Sets the input tracking flag.- Parameters:
b
- True if input tracking should be on; false otherwise.
-
isInputTracking
public boolean isInputTracking()Tests the input tracking flag.- Returns:
- True if input tracking is on; false otherwise.
-
setCurrencyDisplay
public void setCurrencyDisplay(boolean b) Determines if this component currently displays currency data. Widgets that display currency data are capable of automatically toggling their data between a primary and secondary Portal currency type.- Parameters:
b
- if true, indicates that the widget currently displays currency data
-
isCurrencyDisplay
public boolean isCurrencyDisplay()Determines whether the component currently displays currency data.- Returns:
- True if the widget currently displays currency data; false otherwise.
-