jTracer  1.03
Stack trace visualization tool
JPanel org.libcsdbg.jtracer.StatusBar.createField ( String  tag,
String  text 
)
private

Create one of the fields.

Parameters
[in]tagthe field name
[in]textthe field initial text
Returns
the created field

Definition at line 297 of file StatusBar.java.

References org.libcsdbg.jtracer.Registry.get().

298  {
299  GridBagLayout lm = new GridBagLayout();
300  GridBagConstraints c = new GridBagConstraints();
301  JPanel retval = new JPanel(lm);
302 
303  Registry conf = Registry.getCurrent();
304  retval.setBackground((Color) conf.get("statusbar", "bgcolor"));
305  retval.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
306 
307  JLabel field = new JLabel(text);
308  field.setFont((Font) conf.get("statusbar", "font"));
309  field.setForeground((Color) conf.get("statusbar", "fgcolor"));
310 
311  if (tag.equals("status")) {
312  field.setIcon(conf.loadIcon("stat_ok.png"));
313  field.setIconTextGap(6);
314  c.weightx = 1;
315  c.anchor = GridBagConstraints.EAST;
316  }
317 
318  c.insets = new Insets(1, 8, 1, 8);
319  lm.setConstraints(field, c);
320  retval.add(field);
321 
322  fields.put(tag, field);
323  return retval;
324  }

+ Here is the call graph for this function: