Class MemoryOption
java.lang.Object
edu.wisc.ssec.mcidasv.startupmanager.options.AbstractOption
edu.wisc.ssec.mcidasv.startupmanager.options.MemoryOption
- All Implemented Interfaces:
Option,ActionListener,EventListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumprivate static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate MemoryOption.Prefixprivate MemoryOption.Stateprivate final Stringprivate booleanprivate Stringprivate intprivate Stringprivate JRadioButtonprivate JRadioButtonprivate static final org.slf4j.LoggerLogger object.private static final Stringprivate longprivate intprivate static final longprivate static final Patternprivate intprivate static final Stringprivate ChangeListenerprivate static final MemoryOption.Prefix[]private JSliderprivate static final Stringprivate static final Stringprivate static final Stringprivate booleanprivate JLabelprivate JPanelprivate McVTextFieldprivate JPanelprivate static final Stringprivate String -
Constructor Summary
ConstructorsConstructorDescriptionMemoryOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidfromPrefsFormat(String prefText) Initializes the current option using a relevant variable from the startup script.Returns the GUI component that represents the option.private static longgetValue()Returns the value of the option.private voidhandleNewValue(McVTextField field) private booleanisSlider()private booleanisValid()private voidsetState(MemoryOption.State newState) voidForces the value of the option to the data specified.toString()Friendly string representation of the option.Methods inherited from class edu.wisc.ssec.mcidasv.startupmanager.options.AbstractOption
getLabel, getOptionId, getOptionPlatform, getOptionType, getOptionVisibility, isValidPrefFormat, onValidPlatform, toPrefsFormat
-
Field Details
-
logger
Logger object. -
MEGA_BYTES_TO_BYTES
- See Also:
-
TOO_BIG_FMT
- See Also:
-
BAD_MEM_FMT
- See Also:
-
LTE_ZERO_FMT
- See Also:
-
SLIDER_LABEL_FMT
- See Also:
-
SLIDER_LESS_THAN_MIN_LABEL_FMT
- See Also:
-
SLIDER_GREATER_THAN_MAX_LABEL_FMT
- See Also:
-
NO_MEM_PREFIX_FMT
- See Also:
-
PREFIXES
-
currentPrefix
-
sliderActive
-
MEMSTRING
-
defaultPrefValue
-
failsafeValue
-
value
-
jrbSlider
-
jrbNumber
-
sliderPanel
-
sliderLabel
-
slider
-
textPanel
-
text
-
initTextValue
-
minSliderValue
-
maxSliderValue
-
initSliderValue
-
maxmem
-
currentState
-
doneInit
-
percentListener
-
-
Constructor Details
-
MemoryOption
public MemoryOption(String id, String label, String defaultValue, OptionMaster.OptionPlatform optionPlatform, OptionMaster.Visibility optionVisibility)
-
-
Method Details
-
setState
-
isValid
-
isSlider
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
handleNewValue
-
getComponent
Description copied from class:AbstractOptionReturns the GUI component that represents the option.BooleanOptionsare represented by aJCheckBox, whileTextOptionsappear as aJTextField.- Specified by:
getComponentin interfaceOption- Specified by:
getComponentin classAbstractOption- Returns:
- The GUI representation of this option.
-
getSliderComponent
-
getTextComponent
-
toString
Description copied from class:AbstractOptionFriendly string representation of the option.- Specified by:
toStringin interfaceOption- Specified by:
toStringin classAbstractOption- Returns:
Stringcontaining relevant info about the option.- See Also:
-
getValue
Description copied from class:AbstractOptionReturns the value of the option. Note thatBooleanOptionsreturn either "0" or "1".- Specified by:
getValuein interfaceOption- Specified by:
getValuein classAbstractOption- Returns:
- The current value of the option.
-
fromPrefsFormat
Description copied from class:AbstractOptionInitializes the current option using a relevant variable from the startup script.- Specified by:
fromPrefsFormatin interfaceOption- Overrides:
fromPrefsFormatin classAbstractOption- Parameters:
prefText- Line from the startup script that represents the current option.
-
setValue
Description copied from class:AbstractOptionForces the value of the option to the data specified. Note thatBooleanOptionsaccept either "0", or "1".- Specified by:
setValuein interfaceOption- Specified by:
setValuein classAbstractOption- Parameters:
newValue- New value to use.
-
getSystemMemory
-