2.17.2: 2011-06-17

net.sf.basedb.core.plugin
Class GuiContext

java.lang.Object
  extended by net.sf.basedb.core.plugin.GuiContext

public class GuiContext
extends Object

Version:
2.0
Author:
Nicklas
Last modified
$Date: 2010-08-13 10:50:27 +0200 (Fri, 13 Aug 2010) $

Nested Class Summary
static class GuiContext.Type
           
 
Field Summary
private  Item item
           
private  String subContext
           
private  GuiContext.Type type
           
 
Constructor Summary
GuiContext(Item item, GuiContext.Type type)
           
GuiContext(Item item, GuiContext.Type type, String subContext)
           
 
Method Summary
 boolean equals(Object other)
           
 Item getItem()
           
 String getSubContext()
           
 GuiContext.Type getType()
           
 int hashCode()
           
 boolean isCorrectBasicData(Object o)
          Checks if the specified object is an instance of the BasicData subclass used by the Item in this context.
 boolean isCorrectBasicItem(Object o)
          Checks if the specified object is an instance of the BasicItem subclass used by the Item in this context.
static GuiContext item(Item item)
          Shortcut to create a single-item context.
static GuiContext list(Item item)
          Shortcut to create a list context.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

item

private final Item item

type

private final GuiContext.Type type

subContext

private final String subContext
Constructor Detail

GuiContext

public GuiContext(Item item,
                  GuiContext.Type type)
Parameters:
item - Item the context holds.
type - Type of context, shows if it is a list or single view.

GuiContext

public GuiContext(Item item,
                  GuiContext.Type type,
                  String subContext)
Method Detail

item

public static GuiContext item(Item item)
Shortcut to create a single-item context.

Since:
2.9

list

public static GuiContext list(Item item)
Shortcut to create a list context.

Since:
2.9

getItem

public Item getItem()

getType

public GuiContext.Type getType()

getSubContext

public String getSubContext()

isCorrectBasicItem

public boolean isCorrectBasicItem(Object o)
Checks if the specified object is an instance of the BasicItem subclass used by the Item in this context.

Parameters:
o - The object to check
Since:
2.9

isCorrectBasicData

public boolean isCorrectBasicData(Object o)
Checks if the specified object is an instance of the BasicData subclass used by the Item in this context.

Parameters:
o - The object to check
Since:
2.9

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

2.17.2: 2011-06-17