Class GuiContext

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

public class GuiContext extends Object
Version:
2.0
Author:
Nicklas
Last modified
$Date: 2012-03-30 10:22:05 +0200 (fr, 30 mar 2012) $
  • Field Details

  • Constructor Details

    • 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 Details

    • item

      public static GuiContext item(Item item)
      Shortcut to create a single-item context.
      Since:
      2.9
    • item

      public static GuiContext item(Item item, String subContext)
      Shortcut to create a single-item context with a subcontext.
      Since:
      3.2
    • list

      public static GuiContext list(Item item)
      Shortcut to create a list context.
      Since:
      2.9
    • list

      public static GuiContext list(Item item, String subContext)
      Shortcut to create a list context with a subcontext.
      Since:
      3.2
    • 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