net.sf.doolin.gui.field.table
Enum TableSelectionMode

java.lang.Object
  extended by java.lang.Enum<TableSelectionMode>
      extended by net.sf.doolin.gui.field.table.TableSelectionMode
All Implemented Interfaces:
Serializable, Comparable<TableSelectionMode>

public enum TableSelectionMode
extends Enum<TableSelectionMode>

This enumeration defines the different selection modes for a FieldTable.

Author:
Damien Coraboeuf

Enum Constant Summary
MULTIPLE
          Same semantics than ListSelectionModel.MULTIPLE_INTERVAL_SELECTION
MULTIPLE_CONTINUOUS
          Same semantics than ListSelectionModel.SINGLE_INTERVAL_SELECTION
SINGLE
          Same semantics than ListSelectionModel.SINGLE_SELECTION
 
Method Summary
 int getSelectionMode()
          Gets the selection mode as for use in ListSelectionModel.setSelectionMode(int).
 boolean isMultiple()
          Checks if this selection mode means a multiple selection
static TableSelectionMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TableSelectionMode[] 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

MULTIPLE_CONTINUOUS

public static final TableSelectionMode MULTIPLE_CONTINUOUS
Same semantics than ListSelectionModel.SINGLE_INTERVAL_SELECTION


MULTIPLE

public static final TableSelectionMode MULTIPLE
Same semantics than ListSelectionModel.MULTIPLE_INTERVAL_SELECTION


SINGLE

public static final TableSelectionMode SINGLE
Same semantics than ListSelectionModel.SINGLE_SELECTION

Method Detail

values

public static TableSelectionMode[] 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 (TableSelectionMode c : TableSelectionMode.values())
    System.out.println(c);

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

valueOf

public static TableSelectionMode 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

isMultiple

public boolean isMultiple()
Checks if this selection mode means a multiple selection

Returns:
true if several items may be selected

getSelectionMode

public int getSelectionMode()
Gets the selection mode as for use in ListSelectionModel.setSelectionMode(int).

Returns:
Selection mode


Copyright © 2011. All Rights Reserved.