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>categoriesprotected intcategoryHeightintcategorySpacingjava.util.ArrayList<CategoryLayoutConstraints>constraintsprotected intheightFields 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 voidactionPerformed(java.awt.event.ActionEvent e)voidaddLayoutComponent(java.awt.Component comp, java.lang.Object cons)voidcollapseAllCategories()voidcollapseCategory(java.lang.String cat)voidcollapseOtherCategories(java.lang.String cat)voidexpandAllCategories()voidexpandCategory(java.lang.String cat)protected CategoryTitlegetCategoryComponent(java.lang.String category)protected intgetHeight()voidlayoutContainer(java.awt.Container parent)voidremoveLayoutComponent(java.awt.Component comp)protected voidsetHeight()voidupdateParent(CategoryTitle c)Methods inherited from class mgui.interfaces.layouts.LineLayout
addLayoutComponent, getLayoutAlignmentX, getLayoutAlignmentY, invalidateLayout, maximumLayoutSize, minimumLayoutSize, preferredLayoutSize, setFlexibleComponent, setPreferredSizeMethods 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:
layoutContainerin interfacejava.awt.LayoutManager- Overrides:
layoutContainerin classLineLayout
-
setHeight
protected void setHeight() -
getHeight
protected int getHeight() -
removeLayoutComponent
public void removeLayoutComponent(java.awt.Component comp)- Specified by:
removeLayoutComponentin interfacejava.awt.LayoutManager- Overrides:
removeLayoutComponentin classLineLayout
-
addLayoutComponent
public void addLayoutComponent(java.awt.Component comp, java.lang.Object cons)- Specified by:
addLayoutComponentin interfacejava.awt.LayoutManager2- Overrides:
addLayoutComponentin classLineLayout
-
getCategoryComponent
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
updateParent
-
collapseAllCategories
public void collapseAllCategories()- Specified by:
collapseAllCategoriesin interfaceCategoryObject
-
collapseCategory
public void collapseCategory(java.lang.String cat)- Specified by:
collapseCategoryin interfaceCategoryObject
-
collapseOtherCategories
public void collapseOtherCategories(java.lang.String cat)- Specified by:
collapseOtherCategoriesin interfaceCategoryObject
-
expandAllCategories
public void expandAllCategories()- Specified by:
expandAllCategoriesin interfaceCategoryObject
-
expandCategory
public void expandCategory(java.lang.String cat)- Specified by:
expandCategoryin interfaceCategoryObject
-