org.obolibrary.gui
Class GuiTools

java.lang.Object
  extended by org.obolibrary.gui.GuiTools

public class GuiTools
extends Object

Tools for the layout and handling of the GUI components.


Nested Class Summary
static class GuiTools.GBHelper
          Simplify the GridBagConstrains handling.
static class GuiTools.SizedJPanel
          All tabbed panels should have the same preferred size.
 
Constructor Summary
GuiTools()
           
 
Method Summary
static void addRowGap(JPanel panel, GuiTools.GBHelper pos, int size)
          Add an additional row with a fixed size for layout purposes.
static JTextField createTextField(String defaultValue)
          Create a new JTextField and set text value to a give default.
static List<String> getStrings(JTextArea jTextArea)
          Retrieve the lines as a list of strings from a given JTextArea.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuiTools

public GuiTools()
Method Detail

createTextField

public static JTextField createTextField(String defaultValue)
Create a new JTextField and set text value to a give default.

Parameters:
defaultValue -
Returns:
textField

addRowGap

public static void addRowGap(JPanel panel,
                             GuiTools.GBHelper pos,
                             int size)
Add an additional row with a fixed size for layout purposes. Works only with GridBagLayout and GuiTools.GBHelper.

Parameters:
panel - The panel to layout
pos - Layout position information
size - height of the row in pixel

getStrings

public static List<String> getStrings(JTextArea jTextArea)
Retrieve the lines as a list of strings from a given JTextArea.

Parameters:
jTextArea -
Returns:
list of strings


Copyright © 2010-2014. All Rights Reserved.