Class CategoryLayout

java.lang.Object
mgui.interfaces.layouts.LineLayout
mgui.interfaces.layouts.CategoryLayout
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.LayoutManager, java.awt.LayoutManager2, java.io.Serializable, java.util.EventListener, CategoryObject

public class CategoryLayout
extends LineLayout
implements java.awt.event.ActionListener, CategoryObject
Extends LineLayout to provide collapsible categories.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
See Also:
Serialized Form
  • Field Details

    • categories

      public java.util.ArrayList<mgui.interfaces.layouts.CategoryLayout.catObj> categories
    • constraints

      public java.util.ArrayList<CategoryLayoutConstraints> constraints
    • categorySpacing

      public int categorySpacing
    • height

      protected int height
    • categoryHeight

      protected int categoryHeight
  • Constructor Details

    • CategoryLayout

      public CategoryLayout()
    • CategoryLayout

      public CategoryLayout​(int height, int gap, int width, int spc)
    • CategoryLayout

      public CategoryLayout​(int height, int gap, int width, int spc, int cat_height)
  • Method Details

    • layoutContainer

      public void layoutContainer​(java.awt.Container parent)
      Specified by:
      layoutContainer in interface java.awt.LayoutManager
      Overrides:
      layoutContainer in class LineLayout
    • setHeight

      protected void setHeight()
    • getHeight

      protected int getHeight()
    • removeLayoutComponent

      public void removeLayoutComponent​(java.awt.Component comp)
      Specified by:
      removeLayoutComponent in interface java.awt.LayoutManager
      Overrides:
      removeLayoutComponent in class LineLayout
    • addLayoutComponent

      public void addLayoutComponent​(java.awt.Component comp, java.lang.Object cons)
      Specified by:
      addLayoutComponent in interface java.awt.LayoutManager2
      Overrides:
      addLayoutComponent in class LineLayout
    • getCategoryComponent

      protected CategoryTitle getCategoryComponent​(java.lang.String category)
    • actionPerformed

      public void actionPerformed​(java.awt.event.ActionEvent e)
      Specified by:
      actionPerformed in interface java.awt.event.ActionListener
    • updateParent

      public void updateParent​(CategoryTitle c)
    • collapseAllCategories

      public void collapseAllCategories()
      Specified by:
      collapseAllCategories in interface CategoryObject
    • collapseCategory

      public void collapseCategory​(java.lang.String cat)
      Specified by:
      collapseCategory in interface CategoryObject
    • collapseOtherCategories

      public void collapseOtherCategories​(java.lang.String cat)
      Specified by:
      collapseOtherCategories in interface CategoryObject
    • expandAllCategories

      public void expandAllCategories()
      Specified by:
      expandAllCategories in interface CategoryObject
    • expandCategory

      public void expandCategory​(java.lang.String cat)
      Specified by:
      expandCategory in interface CategoryObject