public TreeCombo(JTree tree) { super(); setModel(new TreeToListModel(tree)); setRenderer(new ListEntryRenderer(tree)); }
/** * Create a text field and add it to the panel. */ public JTextField createTextField(String name, String defvalue) { return createTextField(name, defvalue, false, 0); }
/** * Add a component that spans a full line. * No label is rendered. */ public void addComponent(String name, JComponent comp) { addComponent(name, comp, 0, -1); }
public void run() { sp.setDividerLocation(height); // sp.setDividerLocation(sp.getMaximumDividerLocation() - height); } });
/** * Create a combo box and add it to the panel. */ public JComboBox createComboBox(String name, Object[] values) { return createComboBox(name, values, false, 0); }
public void run() { SGUI.showError(ControlCenterWindow.this, errortitle, errormessage, exception); } });
/** * Create a check box and add it to the panel. */ public JCheckBox createCheckBox(String name, boolean selected, boolean enabled, double weighty) { return createCheckBox(name, selected, enabled, weighty, null); }
/** * Add a component that spans a full line. * No label is rendered. */ public void addFullLineComponent(String name, JComponent comp) { addFullLineComponent(name, comp, 0); }
public Object getValueAt(int rowIndex, int columnIndex) { if((!editable || columnIndex!=0) && rowIndex<getEntries().length) { return getEntries()[rowIndex]; } else { return ""; } }
/** * Get the console height. * @return The console height. */ public double getConsoleHeight() { return sp.getProportionalDividerLocation();//sp.getMaximumDividerLocation() - sp.getDividerLocation(); }
/** * Set the list title. * @param title The title. */ public void setTitle(String title) { this.title = title; refresh(); }
/** * Set if duplicates are allowed. * @param allowduplicates the allowduplicates to set. */ public void setAllowDuplicates(boolean allowduplicates) { this.allowduplicates = allowduplicates; if(!allowduplicates) removeDuplicates(); }
/** * Create a dialog with a specific content panel. */ public static boolean createDialog(String title, JComponent content, JComponent comp) { return createDialog(title, content, comp, false); }
/** * Create a text field and add it to the panel. */ public JTextField createTextField(String name, String defvalue, boolean editable) { return createTextField(name, defvalue, editable, 0); }
/** * Add a component */ public void addComponent(String name, JComponent comp, double weighty) { addComponent(name, comp, weighty, -1); }
public void run() { sp.setDividerLocation(height); // sp.setDividerLocation(sp.getMaximumDividerLocation() - height); } });
public void run() { SGUI.showError(ControlCenterWindow.this, errortitle, errormessage, exception); } });
/** * Get the console height. * @return The console height. */ public double getConsoleHeight() { return sp.getProportionalDividerLocation();//sp.getMaximumDividerLocation() - sp.getDividerLocation(); }
/** * Create a text field and add it to the panel. */ public JTextField createTextField(String name, String defvalue, boolean editable, double weighty) { return createTextField(name, defvalue, editable, weighty, null); }
/** * Create a text field and add it to the panel. */ public JTextField createTextField(String name) { return createTextField(name, null); }