net.sf.basedb.core.plugin
Class GuiContext
java.lang.Object
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) $
item
private final Item item
type
private final GuiContext.Type type
subContext
private final String subContext
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)
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