Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.maddyhome.idea.vim.option
Class ToggleOption  view ToggleOption download ToggleOption.java

java.lang.Object
  extended bycom.maddyhome.idea.vim.option.Option
      extended bycom.maddyhome.idea.vim.option.ToggleOption

public class ToggleOption
extends Option

Represents a boolean option


Nested Class Summary
 
Nested classes inherited from class com.maddyhome.idea.vim.option.Option
Option.NameSorter
 
Field Summary
protected  boolean dflt
           
protected  boolean value
           
 
Fields inherited from class com.maddyhome.idea.vim.option.Option
abbrev, listeners, name
 
Constructor Summary
(package private) ToggleOption(java.lang.String name, java.lang.String abbrev, boolean dflt)
          Creates the option
 
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
 
Methods inherited from class com.maddyhome.idea.vim.option.Option
addOptionChangeListener, fireOptionChangeEvent, getAbbreviation, getName, removeOptionChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dflt

protected boolean dflt

value

protected boolean value
Constructor Detail

ToggleOption

ToggleOption(java.lang.String name,
             java.lang.String abbrev,
             boolean dflt)
Creates the option

Method Detail

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