org.openide.text 6.27.1

org.openide.text
Enum Line.ShowOpenType

java.lang.Object
  extended by java.lang.Enum<Line.ShowOpenType>
      extended by org.openide.text.Line.ShowOpenType
All Implemented Interfaces:
Serializable, Comparable<Line.ShowOpenType>
Enclosing class:
Line

public static enum Line.ShowOpenType
extends Enum<Line.ShowOpenType>

ShowOpenType and ShowVisibilityType is replacement for constants SHOW_TRY_SHOW, SHOW_SHOW, SHOW_GOTO, SHOW_TOFRONT, SHOW_REUSE, SHOW_REUSE_NEW. It is to provide full control over show method behavior without need to add new constant for missing flag combination.

Note: Any modification of editor marked for reuse resets reuse flag. There is one global static reference so only one or none editor can be marked for reuse.

Since:
org.openide.text 6.21
See Also:
show, ShowVisibilityType

Enum Constant Summary
NONE
          shows the line only if the editor is open
OPEN
          opens editor if necessary (editor was not opened) and shows the line
REUSE
          replaces editor marked for reuse (last editor opened using REUSE or REUSE_NEW and opens editor if necessary, if editor is being opened (editor was not opened) marks it for reuse, shows the line
REUSE_NEW
          ignores editor marked for reuse (resets reference to editor marked for reuse), opens editor if necessary, if editor is being opened (editor was not opened) marks it for reuse, shows the line
 
Method Summary
static Line.ShowOpenType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Line.ShowOpenType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final Line.ShowOpenType NONE
shows the line only if the editor is open


OPEN

public static final Line.ShowOpenType OPEN
opens editor if necessary (editor was not opened) and shows the line


REUSE

public static final Line.ShowOpenType REUSE
replaces editor marked for reuse (last editor opened using REUSE or REUSE_NEW and opens editor if necessary, if editor is being opened (editor was not opened) marks it for reuse, shows the line


REUSE_NEW

public static final Line.ShowOpenType REUSE_NEW
ignores editor marked for reuse (resets reference to editor marked for reuse), opens editor if necessary, if editor is being opened (editor was not opened) marks it for reuse, shows the line

Method Detail

values

public static Line.ShowOpenType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Line.ShowOpenType c : Line.ShowOpenType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Line.ShowOpenType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

org.openide.text 6.27.1

Built on February 22 2010.  |  Portions Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.