use of com.archimatetool.model.IFeatures in project archi by archimatetool.
the class IconVisibleSection method createControls.
@Override
protected void createControls(Composite parent) {
// $NON-NLS-1$
createLabel(parent, Messages.IconVisibleSection_0 + ":", ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
fIconVisibleCombo = new Combo(parent, SWT.READ_ONLY);
getWidgetFactory().adapt(fIconVisibleCombo, true, true);
fIconVisibleCombo.setItems(VISIBLE_CHOICES);
fIconVisibleCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
CompoundCommand result = new CompoundCommand();
for (EObject selected : getEObjects()) {
if (isAlive(selected)) {
Command cmd = new FeatureCommand(Messages.IconVisibleSection_0, (IFeatures) selected, IDiagramModelObject.FEATURE_ICON_VISIBLE, mapFromComboToValue(), IDiagramModelObject.FEATURE_ICON_VISIBLE_DEFAULT);
if (cmd.canExecute()) {
result.add(cmd);
}
}
}
executeCommand(result.unwrap());
}
});
// Help
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, HELP_ID);
}
use of com.archimatetool.model.IFeatures in project archi by archimatetool.
the class ImageSourceSection method createControls.
@Override
protected void createControls(Composite parent) {
createLabel(parent, Messages.ImageSourceSection_3, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
fImageSourceCombo = new Combo(parent, SWT.READ_ONLY);
getWidgetFactory().adapt(fImageSourceCombo, true, true);
fImageSourceCombo.setItems(IMAGE_SOURCE_CHOICES);
fImageSourceCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
CompoundCommand result = new CompoundCommand();
for (EObject selected : getEObjects()) {
if (isAlive(selected)) {
Command cmd = new FeatureCommand(Messages.ImageSourceSection_2, (IFeatures) selected, IDiagramModelArchimateObject.FEATURE_IMAGE_SOURCE, mapFromComboToValue(), IDiagramModelArchimateObject.FEATURE_IMAGE_SOURCE_DEFAULT);
if (cmd.canExecute()) {
result.add(cmd);
}
}
}
executeCommand(result.unwrap());
}
});
// Help
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, HELP_ID);
}
use of com.archimatetool.model.IFeatures in project archi by archimatetool.
the class JunctionConnectionArrowsSection method createHideArrowsControl.
private void createHideArrowsControl(Composite parent) {
// $NON-NLS-1$
createLabel(parent, Messages.JunctionConnectionArrowsSection_0 + ":", ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
buttonHideArrowHeads = getWidgetFactory().createButton(parent, null, SWT.CHECK);
buttonHideArrowHeads.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
CompoundCommand result = new CompoundCommand();
for (EObject junctionObject : getEObjects()) {
if (isAlive(junctionObject)) {
Command cmd = new FeatureCommand(Messages.JunctionConnectionArrowsSection_1, (IFeatures) junctionObject, IDiagramModelArchimateObject.FEATURE_HIDE_JUNCTION_ARROWS, buttonHideArrowHeads.getSelection(), IDiagramModelArchimateObject.FEATURE_HIDE_JUNCTION_ARROWS_DEFAULT);
if (cmd.canExecute()) {
result.add(cmd);
}
}
}
executeCommand(result.unwrap());
}
});
}
use of com.archimatetool.model.IFeatures in project archi by archimatetool.
the class LabelRendererSection method createControls.
@Override
protected void createControls(Composite parent) {
createLabel(parent, Messages.LabelRendererSection_0, ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.NONE);
StyledTextControl styledTextControl = createStyledTextControl(parent, SWT.NONE);
styledTextControl.setMessage(Messages.LabelRendererSection_1);
fTextRender = new PropertySectionTextControl(styledTextControl.getControl(), TextRenderer.FEATURE_NAME) {
@Override
protected void textChanged(String oldText, String newText) {
CompoundCommand result = new CompoundCommand();
for (EObject eObject : getEObjects()) {
if (isAlive(eObject)) {
// $NON-NLS-1$
Command cmd = new FeatureCommand(Messages.LabelRendererSection_2, (IFeatures) eObject, TextRenderer.FEATURE_NAME, newText, "");
if (cmd.canExecute()) {
result.add(cmd);
}
}
}
executeCommand(result.unwrap());
}
};
// Help ID
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, HELP_ID);
}
use of com.archimatetool.model.IFeatures in project archi by archimatetool.
the class DiagramConnectionSection method createDisplayNameControl.
private void createDisplayNameControl(Composite parent) {
// $NON-NLS-1$
createLabel(parent, Messages.DiagramConnectionSection_8 + ":", ITabbedLayoutConstants.STANDARD_LABEL_WIDTH, SWT.CENTER);
fButtonDisplayName = getWidgetFactory().createButton(parent, null, SWT.CHECK);
fButtonDisplayName.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
CompoundCommand result = new CompoundCommand();
for (EObject connection : getEObjects()) {
if (isAlive(connection)) {
Command cmd = new FeatureCommand(Messages.DiagramConnectionSection_8, (IFeatures) connection, IDiagramModelConnection.FEATURE_NAME_VISIBLE, fButtonDisplayName.getSelection(), IDiagramModelConnection.FEATURE_NAME_VISIBLE_DEFAULT);
if (cmd.canExecute()) {
result.add(cmd);
}
}
}
executeCommand(result.unwrap());
}
});
}
Aggregations