Package mgui.interfaces.layouts
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 Summary
Fields Modifier and Type Field Description java.util.ArrayList<mgui.interfaces.layouts.CategoryLayout.catObj>
categories
protected int
categoryHeight
int
categorySpacing
java.util.ArrayList<CategoryLayoutConstraints>
constraints
protected int
height
Fields inherited from class mgui.interfaces.layouts.LineLayout
components, flexible_component, lineGap, lineHeight, lineWidth, maximumSize, minimumSize, preferredSize
-
Constructor Summary
Constructors Constructor Description CategoryLayout()
CategoryLayout(int height, int gap, int width, int spc)
CategoryLayout(int height, int gap, int width, int spc, int cat_height)
-
Method Summary
Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
void
addLayoutComponent(java.awt.Component comp, java.lang.Object cons)
void
collapseAllCategories()
void
collapseCategory(java.lang.String cat)
void
collapseOtherCategories(java.lang.String cat)
void
expandAllCategories()
void
expandCategory(java.lang.String cat)
protected CategoryTitle
getCategoryComponent(java.lang.String category)
protected int
getHeight()
void
layoutContainer(java.awt.Container parent)
void
removeLayoutComponent(java.awt.Component comp)
protected void
setHeight()
void
updateParent(CategoryTitle c)
Methods inherited from class mgui.interfaces.layouts.LineLayout
addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, setFlexibleComponent, setPreferredSize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
categories
public java.util.ArrayList<mgui.interfaces.layouts.CategoryLayout.catObj> categories -
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 interfacejava.awt.LayoutManager
- Overrides:
layoutContainer
in classLineLayout
-
setHeight
protected void setHeight() -
getHeight
protected int getHeight() -
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)- Specified by:
removeLayoutComponent
in interfacejava.awt.LayoutManager
- Overrides:
removeLayoutComponent
in classLineLayout
-
addLayoutComponent
public void addLayoutComponent(java.awt.Component comp, java.lang.Object cons)- Specified by:
addLayoutComponent
in interfacejava.awt.LayoutManager2
- Overrides:
addLayoutComponent
in classLineLayout
-
getCategoryComponent
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
-
updateParent
-
collapseAllCategories
public void collapseAllCategories()- Specified by:
collapseAllCategories
in interfaceCategoryObject
-
collapseCategory
public void collapseCategory(java.lang.String cat)- Specified by:
collapseCategory
in interfaceCategoryObject
-
collapseOtherCategories
public void collapseOtherCategories(java.lang.String cat)- Specified by:
collapseOtherCategories
in interfaceCategoryObject
-
expandAllCategories
public void expandAllCategories()- Specified by:
expandAllCategories
in interfaceCategoryObject
-
expandCategory
public void expandCategory(java.lang.String cat)- Specified by:
expandCategory
in interfaceCategoryObject
-