public void setText(String sin) { String s = sin; if (s == null) s = ""; if (!s.equals(popB.getText())) { popB.setText(s); popB.invalidate(); validate(); } }
@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); }
public Dimension getPreferredSize() { if (fixedSize) { return new Dimension(60, 20); } else { return popB.getPreferredSize(); } }
public void setEnabled(boolean b) { popB.setEnabled(b); mymenu.setEnabled(b); }
public void setLabel(String s) { popB.setText(s); }
public void setBg(Color c) { popB.setBg(c); setBackground(c); }
public String getLabel() { return popB.getText(); }