コード例 #1
0
ファイル: MiComboBox.java プロジェクト: justacoder/mica
  /**
   * ------------------------------------------------------ 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;
  }
コード例 #2
0
ファイル: MiTableCell.java プロジェクト: justacoder/mica
  /**
   * 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();
  }
コード例 #3
0
  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);
  }
コード例 #4
0
ファイル: MiComboBox.java プロジェクト: justacoder/mica
 public void setSensitive(boolean flag) {
   super.setSensitive(flag);
   textField.setSensitive(flag);
   menuLauncherButton.setSensitive(flag);
 }