public class SwingGroovyMethods extends Object
| Constructor and Description |
|---|
SwingGroovyMethods() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear(Container self)
Removes all components from the Container.
|
static void |
clear(DefaultComboBoxModel self)
Removes all items from the model.
|
static void |
clear(DefaultListModel self)
Removes all elements from the DefaultListModel.
|
static void |
clear(DefaultMutableTreeNode self)
Removes all children nodes from the DefaultMutableTreeNode.
|
static void |
clear(JComboBox self)
Removes all items from the JComboBox.
|
static void |
clear(JTabbedPane self)
Removes all elements from the JTabbedPane.
|
static AbstractButton |
getAt(ButtonGroup self,
int index)
Support the subscript operator for ButtonGroup.
|
static Component |
getAt(Container self,
int index)
Support the subscript operator for Container.
|
static Object |
getAt(JComboBox self,
int index)
Support the subscript operator for JComboBox.
|
static JMenu |
getAt(JMenuBar self,
int index)
Support the subscript operator for JMenuBar.
|
static Component |
getAt(JMenu self,
int index)
Support the subscript operator for JMenu.
|
static Component |
getAt(JTabbedPane self,
int index)
Support the subscript operator for JTabbedPane.
|
static Component |
getAt(JToolBar self,
int index)
Support the subscript operator for JToolBar.
|
static Object |
getAt(ListModel self,
int index)
Support the subscript operator for ListModel.
|
static TableColumn |
getAt(TableColumnModel self,
int index)
Support the subscript operator for TableColumnModel.
|
static Object[] |
getAt(TableModel self,
int index)
Support the subscript operator for TableModel.
|
static TreeNode |
getAt(TreeNode self,
int index)
Support the subscript operator for TreeNode.
|
static Object |
getAt(TreePath self,
int index)
Support the subscript operator for TreePath.
|
static Iterator<AbstractButton> |
iterator(ButtonGroup self)
Returns an
Iterator which traverses the ButtonGroup one AbstractButton at a time. |
static Iterator<Component> |
iterator(Container self)
Returns an
Iterator which traverses the Container one Component at a time. |
static Iterator |
iterator(DefaultListModel self)
Returns an
Iterator which traverses the DefaultListModel one element at a time. |
static Iterator |
iterator(DefaultTableModel self)
Returns an
Iterator which traverses the DefaultTableModel one item at a time. |
static Iterator |
iterator(JComboBox self)
Returns an
Iterator which traverses the ComboBox one item at a time. |
static Iterator |
iterator(JMenu self)
Returns an
Iterator which traverses the JMenu one component at a time. |
static Iterator |
iterator(JMenuBar self)
Returns an
Iterator which traverses the JMenuBar one menu at a time. |
static Iterator<MenuElement> |
iterator(JPopupMenu self)
Returns an
Iterator which traverses the JPopupMenu one MenuElement at a time. |
static Iterator<Component> |
iterator(JTabbedPane self)
Returns an
Iterator which traverses the JTabbedPane one Component tab at a time. |
static Iterator |
iterator(ListModel self)
Returns an
Iterator which traverses the ListModel one element at a time. |
static Iterator |
iterator(MutableComboBoxModel self)
Returns an
Iterator which traverses the MutableComboBoxModel one item at a time. |
static Iterator<TableColumn> |
iterator(TableColumnModel self)
Returns an
Iterator which traverses the TableColumnModel one TableColumn at a time. |
static Iterator |
iterator(TableModel self)
Returns an
Iterator which traverses the TableModel one row at a time. |
static Iterator<TreeNode> |
iterator(TreeNode self)
Returns an
Iterator which traverses the TreeNode one node at a time. |
static Iterator |
iterator(TreePath self)
Returns an
Iterator which traverses the TreePath one path at a time. |
static ButtonGroup |
leftShift(ButtonGroup self,
AbstractButton b)
Overloads the left shift operator to provide an easy way to add
buttons to a ButtonGroup.
|
static Container |
leftShift(Container self,
Component c)
Overloads the left shift operator to provide an easy way to add
components to a Container.
|
static DefaultListModel |
leftShift(DefaultListModel self,
Object e)
Overloads the left shift operator to provide an easy way to add
elements to a DefaultListModel.
|
static DefaultMutableTreeNode |
leftShift(DefaultMutableTreeNode self,
DefaultMutableTreeNode node)
Overloads the left shift operator to provide an easy way to add
nodes to a DefaultMutableTreeNode.
|
static DefaultTableModel |
leftShift(DefaultTableModel self,
Object row)
Overloads the left shift operator to provide an easy way to add
rows to a DefaultTableModel.
|
static JComboBox |
leftShift(JComboBox self,
Object i)
Overloads the left shift operator to provide an easy way to add
items to a JComboBox.
|
static JMenu |
leftShift(JMenu self,
Action action)
Overloads the left shift operator to provide an easy way to add
components to a menu.
|
static JMenuBar |
leftShift(JMenuBar self,
JMenu menu)
Overloads the left shift operator to provide an easy way to add
menus to a menuBar.
|
static JMenu |
leftShift(JMenu self,
Component component)
Overloads the left shift operator to provide an easy way to add
components to a menu.
|
static JMenu |
leftShift(JMenu self,
GString gstr)
Overloads the left shift operator to provide an easy way to add
components to a menu.
|
static JMenu |
leftShift(JMenu self,
JMenuItem item)
Overloads the left shift operator to provide an easy way to add
components to a menu.
|
static JMenu |
leftShift(JMenu self,
String str)
Overloads the left shift operator to provide an easy way to add
components to a menu.
|
static JPopupMenu |
leftShift(JPopupMenu self,
Action action)
Overloads the left shift operator to provide an easy way to add
components to a popupMenu.
|
static JPopupMenu |
leftShift(JPopupMenu self,
Component component)
Overloads the left shift operator to provide an easy way to add
components to a popupMenu.
|
static JPopupMenu |
leftShift(JPopupMenu self,
GString gstr)
Overloads the left shift operator to provide an easy way to add
components to a popupMenu.
|
static JPopupMenu |
leftShift(JPopupMenu self,
JMenuItem item)
Overloads the left shift operator to provide an easy way to add
components to a popupMenu.
|
static JPopupMenu |
leftShift(JPopupMenu self,
String str)
Overloads the left shift operator to provide an easy way to add
components to a popupMenu.
|
static JToolBar |
leftShift(JToolBar self,
Action action)
Overloads the left shift operator to provide an easy way to add
components to a toolBar.
|
static MutableComboBoxModel |
leftShift(MutableComboBoxModel self,
Object i)
Overloads the left shift operator to provide an easy way to add
items to a MutableComboBoxModel.
|
static MutableTreeNode |
leftShift(MutableTreeNode self,
MutableTreeNode node)
Overloads the left shift operator to provide an easy way to add
nodes to a MutableTreeNode.
|
static TableColumnModel |
leftShift(TableColumnModel self,
TableColumn column)
Overloads the left shift operator to provide an easy way to add
columns to a TableColumnModel.
|
static TreePath |
leftShift(TreePath self,
Object p)
Overloads the left shift operator to provide an easy way to add
paths to a treePath.
|
static void |
putAt(DefaultListModel self,
int index,
Object e)
Allow DefaultListModel to work with subscript operators.
|
static void |
putAt(DefaultTableModel self,
int index,
Object row)
Allow DefaultTableModel to work with subscript operators.
|
static void |
putAt(MutableComboBoxModel self,
int index,
Object i)
Allow MutableComboBoxModel to work with subscript operators.
|
static void |
putAt(MutableTreeNode self,
int index,
MutableTreeNode node)
Allow MutableTreeNode to work with subscript operators.
|
static void |
setMnemonic(AbstractButton button,
String mnemonic)
Allows the usage of a one-element string for a mnemonic
|
static int |
size(ButtonGroup self)
Provide the standard Groovy
size() method for ButtonGroup. |
static int |
size(Container self)
Provide the standard Groovy
size() method for Container. |
static int |
size(JComboBox self)
Provide the standard Groovy
size() method for JComboBox. |
static int |
size(JMenu self)
Provide the standard Groovy
size() method for JMenu. |
static int |
size(JMenuBar self)
Provide the standard Groovy
size() method for JMenuBar. |
static int |
size(JTabbedPane self)
Provide the standard Groovy
size() method for JTabbedPane. |
static int |
size(ListModel self)
Provide the standard Groovy
size() method for ListModel. |
static int |
size(TableColumnModel self)
Provide the standard Groovy
size() method for TableColumnModel. |
static int |
size(TableModel self)
Provide the standard Groovy
size() method for TableModel. |
static int |
size(TreeNode self)
Provide the standard Groovy
size() method for TreeNode. |
static int |
size(TreePath self)
Provide the standard Groovy
size() method for TreePath. |
public static int size(Container self)
size() method for Container.self - a Containerpublic static Component getAt(Container self, int index)
self - a Containerindex - the index of the Component to getpublic static Container leftShift(Container self, Component c)
self - a Containerc - a Component to be added to the container.public static Iterator<Component> iterator(Container self)
Iterator which traverses the Container one Component at a time.self - a Containerpublic static void clear(Container self)
self - a Containerpublic static int size(ButtonGroup self)
size() method for ButtonGroup.self - a ButtonGrouppublic static AbstractButton getAt(ButtonGroup self, int index)
self - a ButtonGroupindex - the index of the AbstractButton to getpublic static ButtonGroup leftShift(ButtonGroup self, AbstractButton b)
self - a ButtonGroupb - an AbstractButton to be added to the buttonGroup.public static Iterator<AbstractButton> iterator(ButtonGroup self)
Iterator which traverses the ButtonGroup one AbstractButton at a time.self - a ButtonGrouppublic static int size(ListModel self)
size() method for ListModel.self - a ListModelpublic static Object getAt(ListModel self, int index)
self - a ListModelindex - the index of the element to getpublic static Iterator iterator(ListModel self)
Iterator which traverses the ListModel one element at a time.self - a ListModelpublic static DefaultListModel leftShift(DefaultListModel self, Object e)
self - a DefaultListModele - an element to be added to the listModel.public static void putAt(DefaultListModel self, int index, Object e)
WARNING: this operation does not replace the element at the specified index, rather it inserts the element at that index, thus increasing the size of of the model by 1.
self - a DefaultListModelindex - an indexe - the element to insert at the given indexpublic static void clear(DefaultListModel self)
self - a DefaultListModelpublic static Iterator iterator(DefaultListModel self)
Iterator which traverses the DefaultListModel one element at a time.self - a DefaultListModelpublic static int size(JComboBox self)
size() method for JComboBox.self - a JComboBoxpublic static Object getAt(JComboBox self, int index)
self - a JComboBoxindex - the index of the item to getpublic static JComboBox leftShift(JComboBox self, Object i)
self - a JComboBoxi - an item to be added to the comboBox.public static void clear(JComboBox self)
self - a JComboBoxpublic static Iterator iterator(JComboBox self)
Iterator which traverses the ComboBox one item at a time.self - a ComboBoxpublic static MutableComboBoxModel leftShift(MutableComboBoxModel self, Object i)
self - a MutableComboBoxModeli - an item to be added to the model.public static void putAt(MutableComboBoxModel self, int index, Object i)
WARNING: this operation does not replace the item at the specified index, rather it inserts the item at that index, thus increasing the size of the model by 1.
self - a MutableComboBoxModelindex - an indexi - the item to insert at the given indexpublic static Iterator iterator(MutableComboBoxModel self)
Iterator which traverses the MutableComboBoxModel one item at a time.self - a MutableComboBoxModelpublic static void clear(DefaultComboBoxModel self)
self - a DefaultComboBoxModelpublic static int size(TableModel self)
size() method for TableModel.self - a TableModelpublic static Object[] getAt(TableModel self, int index)
self - a TableModelindex - the index of the row to getpublic static Iterator iterator(TableModel self)
Iterator which traverses the TableModel one row at a time.self - a TableModelpublic static DefaultTableModel leftShift(DefaultTableModel self, Object row)
if row.size < model.size -> row will be padded with nulls
if row.size > model.size -> additional columns will be discarded
self - a DefaultTableModelrow - a row to be added to the model.public static void putAt(DefaultTableModel self, int index, Object row)
WARNING: this operation does not replace the item at the specified index, rather it inserts the item at that index, thus increasing the size of the model by 1.
if row.size < model.size -> row will be padded with nulls
if row.size > model.size -> additional columns will be discarded
self - a DefaultTableModelindex - an indexrow - the row to insert at the given indexpublic static Iterator iterator(DefaultTableModel self)
Iterator which traverses the DefaultTableModel one item at a time.self - a DefaultTableModelpublic static int size(TableColumnModel self)
size() method for TableColumnModel.self - a TableColumnModelpublic static TableColumn getAt(TableColumnModel self, int index)
self - a TableColumnModelindex - the index of the column to getpublic static Iterator<TableColumn> iterator(TableColumnModel self)
Iterator which traverses the TableColumnModel one TableColumn at a time.self - a TableColumnModelpublic static TableColumnModel leftShift(TableColumnModel self, TableColumn column)
self - a TableColumnModelcolumn - a TableColumn to be added to the model.public static int size(TreePath self)
size() method for TreePath.self - a TreePathpublic static Object getAt(TreePath self, int index)
self - a TreePathindex - the index of the path to getpublic static TreePath leftShift(TreePath self, Object p)
WARNING: this operation returns a new TreePath, not the original one.
self - a TreePathp - an object to be added to the treePath.public static Iterator iterator(TreePath self)
Iterator which traverses the TreePath one path at a time.self - a TreePathpublic static int size(TreeNode self)
size() method for TreeNode.self - a TreeNodepublic static TreeNode getAt(TreeNode self, int index)
self - a TreeNodeindex - the index of the child node to getpublic static Iterator<TreeNode> iterator(TreeNode self)
Iterator which traverses the TreeNode one node at a time.self - a TreeNodepublic static MutableTreeNode leftShift(MutableTreeNode self, MutableTreeNode node)
self - a MutableTreeNodenode - a node to be added to the treeNode.public static void putAt(MutableTreeNode self, int index, MutableTreeNode node)
WARNING: this operation does not replace the node at the specified index, rather it inserts the node at that index, thus increasing the size of the treeNode by 1.
self - a MutableTreeNodeindex - an indexnode - the node to insert at the given indexpublic static DefaultMutableTreeNode leftShift(DefaultMutableTreeNode self, DefaultMutableTreeNode node)
self - a DefaultMutableTreeNodenode - a node to be added to the treeNode.public static void clear(DefaultMutableTreeNode self)
self - a DefaultMutableTreeNodepublic static int size(JMenu self)
size() method for JMenu.self - a JMenupublic static Component getAt(JMenu self, int index)
self - a JMenuindex - the index of the menu component to getpublic static JMenu leftShift(JMenu self, Action action)
self - a JMenuaction - an action to be added to the menu.public static JMenu leftShift(JMenu self, Component component)
self - a JMenucomponent - a component to be added to the menu.public static JMenu leftShift(JMenu self, JMenuItem item)
self - a JMenuitem - an item to be added to the menu.public static JMenu leftShift(JMenu self, String str)
self - a JMenustr - a String to be added to the menu.public static JMenu leftShift(JMenu self, GString gstr)
self - a JMenugstr - a GString to be added to the menu.public static Iterator iterator(JMenu self)
Iterator which traverses the JMenu one component at a time.self - a JMenupublic static int size(JMenuBar self)
size() method for JMenuBar.self - a JMenuBarpublic static JMenu getAt(JMenuBar self, int index)
self - a JMenuBarindex - the index of the menu to getpublic static JMenuBar leftShift(JMenuBar self, JMenu menu)
self - a JMenuBarmenu - a menu to be added to the menuBar.public static Iterator iterator(JMenuBar self)
Iterator which traverses the JMenuBar one menu at a time.self - a JMenuBarpublic static JPopupMenu leftShift(JPopupMenu self, Action action)
self - a JPopupMenuaction - an action to be added to the popupMenu.public static JPopupMenu leftShift(JPopupMenu self, Component component)
self - a JPopupMenucomponent - a component to be added to the popupMenu.public static JPopupMenu leftShift(JPopupMenu self, JMenuItem item)
self - a JPopupMenuitem - an item to be added to the popupMenu.public static JPopupMenu leftShift(JPopupMenu self, String str)
self - a JPopupMenustr - a String to be added to the popupMenu.public static JPopupMenu leftShift(JPopupMenu self, GString gstr)
self - a JPopupMenugstr - a GString to be added to the popupMenu.public static Iterator<MenuElement> iterator(JPopupMenu self)
Iterator which traverses the JPopupMenu one MenuElement at a time.self - a JPopupMenupublic static int size(JTabbedPane self)
size() method for JTabbedPane.self - a JTabbedPanepublic static void clear(JTabbedPane self)
self - a JTabbedPanepublic static Component getAt(JTabbedPane self, int index)
self - a JTabbedPaneindex - the index of the tab component to getpublic static Iterator<Component> iterator(JTabbedPane self)
Iterator which traverses the JTabbedPane one Component tab at a time.self - a JTabbedPanepublic static JToolBar leftShift(JToolBar self, Action action)
self - a JToolBaraction - an Action to be added to the toolBar.public static Component getAt(JToolBar self, int index)
self - a JToolBarindex - the index of the tab component to getpublic static void setMnemonic(AbstractButton button, String mnemonic)
button - a AbstractButtonmnemonic - the String