public IFuture<JComponent> createInnerPanel() { pp = new PropertiesPanel("test"); pp.createTextField("date", new Date().toString(), false, 0); return new Future<JComponent>(pp); }
/** * Add a component */ public void addComponent(String name, JComponent comp, double weighty) { addComponent(name, comp, weighty, -1); }
/** * Create a combo box and add it to the panel. */ public JComboBox createComboBox(String name, Object[] values) { return createComboBox(name, values, false, 0); }
PropertiesPanel pp = new PropertiesPanel(); final JTextField tfe = pp.createTextField("English Word", "dog", true); final JTextField tfg = pp.createTextField("German Word"); JButton bt = pp.createButton("Initiate", "Translate");
final PropertiesPanel stop = new PropertiesPanel("Start Options"); stop.createTextField("Java command", "java", true, 0); stop.createTextField("VM arguments", null, true, 0); stop.createTextField("Classpath", null, true, 0); stop.createTextField("Main class", "jadex.base.Starter", true, 0); stop.createTextField("Program arguments", null, true, 0); stop.createTextField("Start directory", ".", true, 0); JButton[] stobuts = stop.createButtons("stobuts", new String[]{"Start", "Reset"}, 1); stobuts[0].setToolTipText("Start a new platform."); stobuts[0].addActionListener(new ActionListener() final PropertiesPanel suop = new PropertiesPanel("Shutdown Options"); suop.addFullLineComponent("platformtable", new JScrollPane(platformt), 1); JButton[] suobuts = suop.createButtons("suobuts", new String[]{"Shutdown"}, 0); suobuts[0].setToolTipText("Start a new platform."); suobuts[0].addActionListener(new ActionListener()
final PropertiesPanel pp = new PropertiesPanel(); JPanel fnp = new JPanel(new GridBagLayout()); final JTextField tfpath = new JTextField(ti.getFileName(), 15); pp.addComponent("File path: ", fnp); pp.createTextField("Size: ", SUtil.bytesToString(ti.getSize())); pp.createTextField("Sender: ", ""+(ti.getOther()==null? ti.getOther(): ti.getOther().getName())); pp.createTextField("Time left: ", "", false);
PropertiesPanel pp = new PropertiesPanel("Settings"); final JTextField tfnick = new JTextField(); JButton bunick = new JButton("Set"); ppan.add(tfnick, BorderLayout.CENTER); ppan.add(bunick, BorderLayout.EAST); pp.addComponent("Nickname: ", ppan); apan.add(tfava, BorderLayout.CENTER); apan.add(buava, BorderLayout.EAST); pp.addComponent("Image: ", apan); buava.addActionListener(new ActionListener() gbc.gridwidth = GridBagConstraints.REMAINDER; pan.add(jbut, gbc); pp.addComponent("Sound files: ", pan); final JCheckBox cb = pp.createCheckBox("Sound enabled: ", sound, true, 0); cb.addActionListener(new ActionListener() final JCheckBox cbar = pp.createCheckBox("Users auto refresh: ", autorefresh, true, 0); cbar.addActionListener(new ActionListener() JButton rsb = pp.createButton("Reset sounds: ", "Reset"); rsb.setMargin(binsets); rsb.addActionListener(new ActionListener() JButton b = pp.createButton("Reset receivers: ", "Reset"); b.setMargin(binsets);
this.pp = new PropertiesPanel("Generate Options"); pp.addComponent("algorithm", alg, 0); AreaData data = GenerateService.ALGORITHMS[0].getDefaultSettings(); pp.createTextField("xmin", ""+data.getXStart(), true, 0); pp.createTextField("xmax", ""+data.getXEnd(), true, 0); pp.createTextField("ymin", ""+data.getYStart(), true, 0); pp.createTextField("ymax", ""+data.getYEnd(), true, 0); pp.createTextField("sizex", ""+data.getSizeX(), true, 0); pp.createTextField("sizey", ""+data.getSizeY(), true, 0); pp.createTextField("max", ""+data.getMax(), true, 0); pp.createTextField("parallel", ""+data.getParallel(), true, 0); pp.createTextField("task size", ""+data.getTaskSize(), true, 0); final JButton[] buts = pp.createButtons("buts", new String[]{"Go"}, 0);
PropertiesPanel pp = new PropertiesPanel(); final JCheckBox jb = pp.createCheckBox("Service call: "); jb.setEnabled(true); jb.setSelected(vact.getMActivity().hasParameter(MActivity.RETURNPARAM)); final JCheckBox cbs = pp.createCheckBox("Sequential result execution: "); cbs.setEnabled(true); cbs.setSelected(vact.getMActivity().hasProperty(MActivity.ISSEQUENTIAL)); final JTextField tfn = pp.createTextField("Result parameter name: "); tfn.setEditable(true); if(vact.getMActivity().hasProperty(MActivity.RESULTNAME)) acc.setRenderer(new ClassInfoComboBoxRenderer()); pp.addComponent("Result paramter type: ", acc);
this.task = task; this.cl = cl; PropertiesPanel pp = new PropertiesPanel(); cbsername = pp.createComboBox("Required service name:", null); cbmethodname = pp.createComboBox("Method name", null); cbmethodname.setRenderer(new BasicComboBoxRenderer() final FixedClassInfoComboModel mo = new FixedClassInfoComboModel(cbranking, -1, new ArrayList<ClassInfo>(container.getAllClasses())); cbranking.setModel(mo); pp.addComponent("Ranking", cbranking);
public void run() PropertiesPanel pp = new PropertiesPanel(); slogantf = pp.createTextField("Current slogan:"); moodtf = pp.createTextField("Current mood:"); JComboBox jmb = pp.createComboBox("Select new mood: ", new Mood[]{Mood.SAD, Mood.HAPPY, Mood.ANGRY, Mood.DISAPPOINTED}); jmb.addItemListener(new ItemListener()
/** * Create a text field and add it to the panel. */ public JTextField createTextField(String name) { return createTextField(name, null); }
this.factories = new LinkedHashMap<String, String>(); final PropertiesPanel modelpanel = new PropertiesPanel("Platform Model"); final JComboBox model = modelpanel.createComboBox("Model", SUtil.EMPTY_STRING_ARRAY, true, 0); final JComboBox factory = modelpanel.createComboBox("Factory", SUtil.EMPTY_STRING_ARRAY, true, 0); final JComboBox config = modelpanel.createComboBox("Configuration", SUtil.EMPTY_STRING_ARRAY, false, 0); config.setEnabled(false); JButton[] buts = modelpanel.createButtons("buts", new String[] JButton[] buts1 = modelpanel.createButtons("buts", new String[]
this.task = task; this.cl = cl; PropertiesPanel pp = new PropertiesPanel(); cbsername = pp.createComboBox("Required service name:", null); cbmethodname = pp.createComboBox("Method name", null); cbmethodname.setRenderer(new BasicComboBoxRenderer()
PropertiesPanel props = new PropertiesPanel("Classpath"); props.addFullLineComponent("classpath", new JScrollPane(classpath), 1); JButton[] buts = props.createButtons("buts", new String[]{"Add...", "Remove..."}, 0);
if(ocl.getComponent(cl)==null) PropertiesPanel pp = new PropertiesPanel(); pp.addFullLineComponent("Settings", new JLabel("Settings")); List<ParameterInfo> pis = mi.getParameterInfos(); for(final ParameterInfo pi: pis)
PropertiesPanel pp = new PropertiesPanel("Settings"); final JTextField tfnick = new JTextField(); JButton bunick = new JButton("Set");
/** * 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); }
/** * Create a button and add it to the panel. */ public JButton createButton(String name, String text) { return createButton(name, text, 0); }