Revision f7a4716c
Added by Patrick Plitzner over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java | ||
---|---|---|
69 | 69 |
@Override |
70 | 70 |
protected void addAction(ToolBarManager toolBarManager) { |
71 | 71 |
|
72 |
if(PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES)){ |
|
73 |
// add textual type designation button |
|
74 |
Action addTextualTypeDesignationAction = new Action("Add", IAction.AS_PUSH_BUTTON){ |
|
75 |
@Override |
|
76 |
public void run() { |
|
77 |
TextualTypeDesignation textualTypeDesignation = TextualTypeDesignation.NewInstance(); |
|
78 |
addElement(textualTypeDesignation); |
|
79 |
if(! getSection().isExpanded()) { |
|
80 |
getSection().setExpanded(true); |
|
81 |
} |
|
82 |
internalUpdateSection(true); |
|
72 |
// add textual type designation button |
|
73 |
Action addTextualTypeDesignationAction = new Action("Add", IAction.AS_PUSH_BUTTON){ |
|
74 |
@Override |
|
75 |
public void run() { |
|
76 |
TextualTypeDesignation textualTypeDesignation = TextualTypeDesignation.NewInstance(); |
|
77 |
addElement(textualTypeDesignation); |
|
78 |
if(! getSection().isExpanded()) { |
|
79 |
getSection().setExpanded(true); |
|
83 | 80 |
} |
84 |
}; |
|
85 |
addTextualTypeDesignationAction.setImageDescriptor(new ImageDescriptor() { |
|
86 |
|
|
87 |
@Override |
|
88 |
public ImageData getImageData() { |
|
89 |
return ImageResources.getImage(ImageResources.ADD_TEXT).getImageData(); |
|
90 |
} |
|
91 |
}); |
|
92 |
addTextualTypeDesignationAction.setToolTipText("Add textual type designation"); |
|
93 |
toolBarManager.add(addTextualTypeDesignationAction); |
|
94 |
} |
|
81 |
internalUpdateSection(true); |
|
82 |
} |
|
83 |
}; |
|
84 |
addTextualTypeDesignationAction.setImageDescriptor(new ImageDescriptor() { |
|
85 |
|
|
86 |
@Override |
|
87 |
public ImageData getImageData() { |
|
88 |
return ImageResources.getImage(ImageResources.ADD_TEXT).getImageData(); |
|
89 |
} |
|
90 |
}); |
|
91 |
addTextualTypeDesignationAction.setToolTipText("Add textual type designation"); |
|
92 |
toolBarManager.add(addTextualTypeDesignationAction); |
|
95 | 93 |
|
96 | 94 |
// clone button |
97 | 95 |
if(!isSpecimenType() || |
Also available in: Unified diff
ref # 8135 Make textual type designation element non-experimental