/* (non-Javadoc)
  * @see org.eclipse.jface.viewers.DialogCellEditor#updateContents(java.lang.Object)
  */
 protected void updateContents(Object value) {
   super.updateContents(value);
   if (getDefaultLabel() != null && value != null) {
     getDefaultLabel().setText(value.toString());
     getDefaultLabel().setToolTipText(value.toString());
   }
 }
예제 #2
0
 @Override
 public void dispose() {
   if (image != null) {
     image.dispose();
     image = null;
   }
   super.dispose();
 }
    protected void updateContents(Object value) {
      DatabaseQuerySettingsStructure.DataMapping mapping =
          (DatabaseQuerySettingsStructure.DataMapping) value;

      if (mapping != null) {
        if (mapping.mappingType == -1) // not affected
        {
          this.getDefaultLabel().setText("No Change");
        } else if (mapping.mappingType == 0) // static value
        {
          this.getDefaultLabel().setText(mapping.mappingValue);
        } else // database column
        {
          this.getDefaultLabel().setText(mapping.mappingValue);
        }
      } else {
        super.updateContents(value);
      }
    }
 /* (non-Javadoc)
  * @see org.eclipse.jface.viewers.DialogCellEditor#doSetValue(java.lang.Object)
  */
 protected void doSetValue(Object value) {
   super.doSetValue(value);
   this.getDefaultLabel().setText(value.toString());
   this.getDefaultLabel().setToolTipText(value.toString());
 }