Example #1
0
  /** @see gov.aps.jca.dbr.DBR_Byte#convert(gov.aps.jca.dbr.DBRType) */
  public DBR convert(DBRType convertType) throws CAStatusException {
    DBR dbr = super.convert(convertType);

    if (dbr.isCTRL()) {
      CTRL ctrl = (CTRL) dbr;

      // no conversion actually needed, all is Number
      ctrl.setUpperCtrlLimit(getUpperCtrlLimit());
      ctrl.setLowerCtrlLimit(getLowerCtrlLimit());
    }

    return dbr;
  }
Example #2
0
 @Override
 void setUp() {
   grid = scrollPanel.viewPort().panel().vertical().add().panel().grid();
   decorator.decorate(grid);
   scrollPanel.height(height);
   grid.spacing(0);
   grid.indent(0);
   grid.resize(maxColumns, Math.min(maxRows, RESIZE_INTERVALL));
   scrollPanel.addScrollListener(this);
   grid.spacing(spacing);
   grid.indent(indent);
   for (IGridClickListener l : listeners.keySet()) {
     String key = listeners.get(l);
     IKey<IGridPanel> keyCB = grid.addGridClickListener(l);
     if (SHIFT.equals(key)) {
       keyCB.shiftPressed();
     } else if (CTRL.equals(key)) keyCB.ctrlPressed();
   }
   onScroll(0);
 }