Example #1
0
  /**
   * ------------------------------------------------------ Copy the state of this MiPart into the
   * target MiPart.
   *
   * @param source the part to copy
   * @overrides MiPart#copy
   * @see MiPart#copy ------------------------------------------------------
   */
  public void copy(MiPart source) {
    super.copy(source);

    MiComboBox obj = (MiComboBox) source;
    restrictingValuesToThoseInList = obj.restrictingValuesToThoseInList;
    restrictionIgnoresCase = obj.restrictionIgnoresCase;
    restrictionWarnsOnly = obj.restrictionWarnsOnly;
  }
Example #2
0
  /**
   * This method sets the value of Text, Widgets and pure Strings. Warning, right and center
   * justfication does not work for pure String cells, only graphics cells.
   */
  public void setValue(String value) {
    if ((strValue == value) || ((strValue != null) && (strValue.equals(value)))) return;

    if (graphics != null) {
      if (graphics instanceof MiWidget) ((MiWidget) graphics).setValue(value);
      if (graphics instanceof MiText) ((MiText) graphics).setText(value);
    }
    strValue = value;
    table.invalidateLayout();
  }
  public int processEvent(MiEvent event) {
    if ((isEnabled())
        && (event.getType() != MiEvent.Mi_TIMER_TICK_EVENT)
        && (event.getType() != MiEvent.Mi_IDLE_EVENT)) {
      tmpPoint.copy(event.worldPt);
      MiPageManager pageManager = event.editor.getPageManager();
      String unitsName = "";
      if (pageManager != null) {
        pageManager.transformWorldPointToUnitsPoint(tmpPoint);
        unitsName = pageManager.getUnits().getAbbreviation();
      }

      if (tmpPoint.x != lastX) {
        lastX = tmpPoint.x;
        xPos.setValue("X: " + Utility.toShortString(tmpPoint.x) + " " + unitsName);
      }
      if (tmpPoint.y != lastY) {
        lastY = tmpPoint.y;
        yPos.setValue("Y: " + Utility.toShortString(tmpPoint.y) + " " + unitsName);
      }
    }
    return (Mi_PROPOGATE_EVENT);
  }
Example #4
0
 public void setSensitive(boolean flag) {
   super.setSensitive(flag);
   textField.setSensitive(flag);
   menuLauncherButton.setSensitive(flag);
 }