Ejemplo n.º 1
0
 /**
  * Ovedrride the method so we can set the highlight label
  *
  * @param g Highlighted glyph
  */
 public void setHighlight(Glyph g) {
   super.setHighlight(g);
   if ((g == null) || !(g instanceof MetSymbol)) {
     highlightLabel.setText("   ");
     return;
   }
   highlightLabel.setText(" " + ((MetSymbol) g).getLabel());
 }
Ejemplo n.º 2
0
 /**
  * Create the name label if needed.
  *
  * @return The component that holds the name label.
  */
 protected JComponent getLabelComponent() {
   if (nameLabel == null) {
     nameLabel = new JLabel();
     Font font = nameLabel.getFont();
     nameLabel.setFont(font.deriveFont(Font.ITALIC | Font.BOLD));
     labelComponent = GuiUtils.hflow(Misc.newList(new JLabel("Layout Model: "), nameLabel));
   }
   return labelComponent;
 }
Ejemplo n.º 3
0
 /**
  * Set the label
  *
  * @param n The name of the station model
  */
 public void setName(String n) {
   // Make sure we got the label
   getLabelComponent();
   if (nameLabel != null) {
     nameLabel.setText(n);
   }
 }
Ejemplo n.º 4
0
 /**
  * Make the gui
  *
  * @return _gui
  */
 protected Component doMakeContents() {
   JComponent comp = (JComponent) super.doMakeContents();
   highlightLabel = new JLabel(" ");
   highlightLabel.setBorder(new FineLineBorder(BevelBorder.LOWERED));
   return GuiUtils.centerBottom(comp, GuiUtils.inset(highlightLabel, new Insets(2, 0, 2, 0)));
 }