use of com.cubrid.common.ui.er.figures.EditableLabel in project cubrid-manager by CUBRID.
the class ColumnPart method handleNameChange.
/**
* @param Handles name change during direct edit
*/
public void handleNameChange(String textValue) {
EditableLabel label = (EditableLabel) getFigure();
label.setVisible(false);
setSelected(EditPart.SELECTED_NONE);
label.revalidate();
}
use of com.cubrid.common.ui.er.figures.EditableLabel in project cubrid-manager by CUBRID.
the class ColumnPart method createFigure.
@Override
protected IFigure createFigure() {
ERTableColumn column = (ERTableColumn) getModel();
String label = column.getLabelText();
EditableLabel columnLabel = new EditableLabel(label);
columnLabel.setPK(column.isPrimaryKey());
if (column.isPrimaryKey()) {
columnLabel.setIcon(pkImage);
columnLabel.setBorder(new ColumnLabelBorder(InsetsType.ICON));
} else {
columnLabel.setIcon(null);
columnLabel.setBorder(new ColumnLabelBorder(InsetsType.TEXT));
}
return columnLabel;
}
use of com.cubrid.common.ui.er.figures.EditableLabel in project cubrid-manager by CUBRID.
the class ColumnPart method refreshVisuals.
/**
* We don't need to explicitly handle refresh visuals because the times when
* this needs to be done it is handled by the table e.g. handleNameChange()
*/
@Override
protected void refreshVisuals() {
ERTableColumn column = (ERTableColumn) getModel();
EditableLabel columnLabel = (EditableLabel) getFigure();
columnLabel.setText(column.getLabelText());
columnLabel.setPK(column.isPrimaryKey());
freshIcon();
freshBorder();
}
use of com.cubrid.common.ui.er.figures.EditableLabel in project cubrid-manager by CUBRID.
the class ColumnPart method handleViewModelChange.
@Override
protected void handleViewModelChange(PropertyChangeEvent evt) {
EditableLabel label = (EditableLabel) getFigure();
label.setText(getColumn().getLabelText());
label.revalidate();
}
use of com.cubrid.common.ui.er.figures.EditableLabel in project cubrid-manager by CUBRID.
the class ColumnPart method revertNameChange.
/**
* Reverts state back to prior edit state
*/
public void revertNameChange(String oldValue) {
EditableLabel label = (EditableLabel) getFigure();
label.setVisible(true);
setSelected(EditPart.SELECTED_PRIMARY);
label.revalidate();
}
Aggregations