Class SimpleStrategyPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
velox.gui.StrategyPanel
velox.api.layer1.simplified.SimpleStrategyPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SimpleStrategyPanel extends velox.gui.StrategyPanel
The class creates a Strategy panel and provides simple methods for placing components into it
See Also:
  • Constructor Details

    • SimpleStrategyPanel

      public SimpleStrategyPanel(String title)
  • Method Details

    • addItem

      public void addItem(String label, Component c)
      Places two components. The first is a JLabel instance with a specified text (label). Each component uses one cell in a row
    • addItems

      public void addItems(String label, Component... components)
      Places two or more components. The first is a JLabel instance with a specified text (label) The rest is an arbitrary number of parameters of the Component type. Each component uses one cell in a row
    • addItems

      public void addItems(Component... components)
      Places an arbitrary number of parameters of the Component type. Each component uses one cell in a row
    • addItems

      public void addItems(Component[] components, int[] gridWidths)
      Places an arbitrary number of parameters of the Component type. Number of cells in a row that the component uses must be specified. The second parameter (gridWidths) is an array of number of cells that components use. For example, an array of {1, 2, 4} specifies 1 cell for components[0], 2 cells for components[1], and 4 cells for component[2]. The components length and the gridWidths length must be equal, otherwise an exception will be thrown.