Class Configurable
- java.lang.Object
-
- com.ensoftcorp.open.commons.codepainter.Configurable
-
- Direct Known Subclasses:
CodePainter
,ColorPalette
public class Configurable extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Configurable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFlagDescription(java.lang.String parameter)
Returns the description of a flagjava.lang.String
getParameterDescription(java.lang.String parameter)
Returns the parameter description or null if the parameter does not existjava.lang.Object
getParameterValue(java.lang.String name)
Returns the specified parameter value or null if the parameter is unspecifiedjava.util.Set<java.lang.String>
getPossibleFlags()
Returns the set of possible flagsjava.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Object>>
getPossibleParameters()
Returns a copy of all possible parameter typesboolean
isFlagSet(java.lang.String name)
Returns true if the given flag was setboolean
isParameterSet(java.lang.String name)
Returns true if the given parameter has been specifiedvoid
restoreDefaultConfigurations()
Restores default configurationsvoid
setFlag(java.lang.String name)
Enables a flagvoid
setParameterValue(java.lang.String name, java.lang.Object value)
Sets a parameter valuevoid
unsetFlag(java.lang.String name)
Disables a flagvoid
unsetParameter(java.lang.String name)
Removes a parameter setting
-
-
-
Method Detail
-
restoreDefaultConfigurations
public final void restoreDefaultConfigurations()
Restores default configurations
-
getPossibleParameters
public final java.util.Map<java.lang.String,java.lang.Class<? extends java.lang.Object>> getPossibleParameters()
Returns a copy of all possible parameter types- Returns:
-
getPossibleFlags
public final java.util.Set<java.lang.String> getPossibleFlags()
Returns the set of possible flags- Returns:
-
getParameterDescription
public final java.lang.String getParameterDescription(java.lang.String parameter)
Returns the parameter description or null if the parameter does not exist- Parameters:
parameter
-- Returns:
-
getFlagDescription
public final java.lang.String getFlagDescription(java.lang.String parameter)
Returns the description of a flag- Parameters:
parameter
-- Returns:
-
isParameterSet
public final boolean isParameterSet(java.lang.String name)
Returns true if the given parameter has been specified- Parameters:
name
-parameters
-- Returns:
-
isFlagSet
public final boolean isFlagSet(java.lang.String name)
Returns true if the given flag was set- Parameters:
name
-parameters
-- Returns:
-
getParameterValue
public final java.lang.Object getParameterValue(java.lang.String name)
Returns the specified parameter value or null if the parameter is unspecified- Parameters:
name
-parameters
-- Returns:
-
setParameterValue
public final void setParameterValue(java.lang.String name, java.lang.Object value)
Sets a parameter value- Parameters:
name
-value
-
-
unsetParameter
public final void unsetParameter(java.lang.String name)
Removes a parameter setting- Parameters:
name
-value
-
-
setFlag
public final void setFlag(java.lang.String name)
Enables a flag- Parameters:
name
-
-
unsetFlag
public final void unsetFlag(java.lang.String name)
Disables a flag- Parameters:
name
-
-
-