Example #1
0
 public void setText(String sin) {
   String s = sin;
   if (s == null) s = "";
   if (!s.equals(popB.getText())) {
     popB.setText(s);
     popB.invalidate();
     validate();
   }
 }
Example #2
0
  @SuppressWarnings("unused")
  public DPopLabel(String s, String itxt) {
    popB = new DButton(itxt);
    popB.setActionCommand(SHOW_MENU);

    mymenu = new JPopupMenu();
    add(mymenu);
    popB.setLabelActor(this);

    setLayout(new BorderLayout());
    add("Center", popB);
  }
Example #3
0
 public Dimension getPreferredSize() {
   if (fixedSize) {
     return new Dimension(60, 20);
   } else {
     return popB.getPreferredSize();
   }
 }
Example #4
0
 public void setEnabled(boolean b) {
   popB.setEnabled(b);
   mymenu.setEnabled(b);
 }
Example #5
0
 public void setLabel(String s) {
   popB.setText(s);
 }
Example #6
0
 public void setBg(Color c) {
   popB.setBg(c);
   setBackground(c);
 }
Example #7
0
 public String getLabel() {
   return popB.getText();
 }