java.lang.Object
com.maddyhome.idea.vim.option.Option
com.maddyhome.idea.vim.option.ToggleOption
- public class ToggleOption
- extends Option
Represents a boolean option
|
Field Summary |
protected boolean |
dflt
|
protected boolean |
value
|
|
Method Summary |
boolean |
getValue()
The option's value |
boolean |
isDefault()
Checks to see if the option's current value equals the default value |
void |
reset()
Resets the option (false) |
void |
resetDefault()
Sets the option to its default value. |
void |
set()
Sets the on (true) |
void |
toggle()
Toggles the option's value (false to true, true to false) |
java.lang.String |
toString()
The display value of the option [no]{name} |
private void |
update(boolean val)
Helper to set the value only it is changing and notify listeners |
dflt
protected boolean dflt
value
protected boolean value
ToggleOption
ToggleOption(java.lang.String name,
java.lang.String abbrev,
boolean dflt)
- Creates the option
getValue
public boolean getValue()
- The option's value
set
public void set()
- Sets the on (true)
reset
public void reset()
- Resets the option (false)
toggle
public void toggle()
- Toggles the option's value (false to true, true to false)
update
private void update(boolean val)
- Helper to set the value only it is changing and notify listeners
toString
public java.lang.String toString()
- The display value of the option [no]{name}
isDefault
public boolean isDefault()
- Checks to see if the option's current value equals the default value
- Specified by:
isDefault in class Option
resetDefault
public void resetDefault()
- Sets the option to its default value.
- Specified by:
resetDefault in class Option