use of org.jkiss.dbeaver.ext.erd.figures.AttributeItemFigure in project dbeaver by serge-rider.
the class AttributePart method revertNameChange.
/**
* Reverts state back to prior edit state
*/
public void revertNameChange(String oldValue) {
AttributeItemFigure label = getFigure();
label.setVisible(true);
setSelected(EditPart.SELECTED_PRIMARY);
label.revalidate();
}
use of org.jkiss.dbeaver.ext.erd.figures.AttributeItemFigure in project dbeaver by serge-rider.
the class AttributePart method createFigure.
/**
* @return the ColumnLabel representing the Column
*/
@Override
protected AttributeItemFigure createFigure() {
ERDEntityAttribute column = (ERDEntityAttribute) getModel();
AttributeItemFigure attributeFigure = new AttributeItemFigure(column);
DiagramPart diagramPart = (DiagramPart) getParent().getParent();
boolean showNullability = diagramPart.getDiagram().hasAttributeStyle(ERDAttributeStyle.NULLABILITY);
Font columnFont = diagramPart.getNormalFont();
Color columnColor = diagramPart.getContentPane().getForegroundColor();
if (column.isInPrimaryKey()) {
columnFont = diagramPart.getBoldFont();
if (showNullability && !column.getObject().isRequired()) {
columnFont = diagramPart.getBoldItalicFont();
}
/*
if (!column.isInForeignKey()) {
columnFont = diagramPart.getBoldFont();
} else {
columnFont = diagramPart.getBoldItalicFont();
}
*/
} else {
if (showNullability && !column.getObject().isRequired()) {
columnFont = diagramPart.getItalicFont();
}
}
if (column.isInForeignKey()) {
//columnColor = Display.getDefault().getSystemColor(SWT.COLOR_DARK_BLUE);
}
attributeFigure.setFont(columnFont);
attributeFigure.setForegroundColor(columnColor);
return attributeFigure;
}
use of org.jkiss.dbeaver.ext.erd.figures.AttributeItemFigure in project dbeaver by serge-rider.
the class AttributePart method commitNameChange.
/**
* Handles when successfully applying direct edit
*/
@Override
protected void commitNameChange(PropertyChangeEvent evt) {
AttributeItemFigure label = getFigure();
label.setText(getAttribute().getLabelText());
setSelected(EditPart.SELECTED_PRIMARY);
label.revalidate();
}
use of org.jkiss.dbeaver.ext.erd.figures.AttributeItemFigure in project dbeaver by dbeaver.
the class AttributePart method createFigure.
/**
* @return the ColumnLabel representing the Column
*/
@Override
protected AttributeItemFigure createFigure() {
ERDEntityAttribute column = (ERDEntityAttribute) getModel();
AttributeItemFigure attributeFigure = new AttributeItemFigure(column);
DiagramPart diagramPart = (DiagramPart) getParent().getParent();
boolean showNullability = diagramPart.getDiagram().hasAttributeStyle(ERDAttributeStyle.NULLABILITY);
Font columnFont = diagramPart.getNormalFont();
Color columnColor = diagramPart.getContentPane().getForegroundColor();
if (column.isInPrimaryKey()) {
columnFont = diagramPart.getBoldFont();
if (showNullability && !column.getObject().isRequired()) {
columnFont = diagramPart.getBoldItalicFont();
}
/*
if (!column.isInForeignKey()) {
columnFont = diagramPart.getBoldFont();
} else {
columnFont = diagramPart.getBoldItalicFont();
}
*/
} else {
if (showNullability && !column.getObject().isRequired()) {
columnFont = diagramPart.getItalicFont();
}
}
if (column.isInForeignKey()) {
// columnColor = Display.getDefault().getSystemColor(SWT.COLOR_DARK_BLUE);
}
attributeFigure.setFont(columnFont);
attributeFigure.setForegroundColor(columnColor);
return attributeFigure;
}
use of org.jkiss.dbeaver.ext.erd.figures.AttributeItemFigure in project dbeaver by dbeaver.
the class AttributePart method revertNameChange.
/**
* Reverts state back to prior edit state
*/
public void revertNameChange(String oldValue) {
AttributeItemFigure label = getFigure();
label.setVisible(true);
setSelected(EditPart.SELECTED_PRIMARY);
label.revalidate();
}
Aggregations