Example #1
0
  public void setLabelFor(Component c) {
    activeComponent = (JComponent) c;
    if (c instanceof ActiveControl) {
      ActiveControl ac = (ActiveControl) c;
      activeProperty = ac.getControlProperty();
      String acCaption = activeProperty.getCaption();
      if (forceUseActiveCaption
          || (!ValueUtil.isEmpty(acCaption) && !acCaption.equals("Caption"))) {
        setName(null);
        setExpression(null);
        formatText(activeProperty.getCaption(), activeProperty.isRequired());
        super.setDisplayedMnemonic(activeProperty.getCaptionMnemonic());
      }

      activeControlSupport = new ActiveControlSupport();
      activeProperty.addPropertyChangeListener(activeControlSupport);
    }
    super.setLabelFor(c);
  }
Example #2
0
 public void setAddCaptionColon(boolean addCaptionColon) {
   this.addCaptionColon = addCaptionColon;
   formatText(activeProperty.getCaption(), activeProperty.isRequired());
 }
Example #3
0
 public String getCaption() {
   return property.getCaption();
 }