Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteEntryProxy.java')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteEntryProxy.java94
1 files changed, 47 insertions, 47 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteEntryProxy.java b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteEntryProxy.java
index 2279ce26dc4..6e77f74fc60 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteEntryProxy.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.palette/src/org/eclipse/papyrus/customization/palette/dialog/PaletteEntryProxy.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -59,9 +59,9 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* A listener can only be added once. Adding it more than once will do nothing.
- *
+ *
* @param listener
- * the PropertyChangeListener that is to be notified of changes
+ * the PropertyChangeListener that is to be notified of changes
* @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
*/
public void addPropertyChangeListener(PropertyChangeListener listener) {
@@ -71,7 +71,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* @param listener
- * the PropertyChangeListener that is not to be notified anymore
+ * the PropertyChangeListener that is not to be notified anymore
* @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
*/
public void removePropertyChangeListener(PropertyChangeListener listener) {
@@ -80,7 +80,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Returns the entry cached by this class
- *
+ *
* @return the palette entry
*/
public PaletteEntry getEntry() {
@@ -89,19 +89,19 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Inits the entry type for this proxy
- *
+ *
* @return the entry type for this proxy
*/
protected EntryType initType() {
- if(entry instanceof PaletteDrawer) {
+ if (entry instanceof PaletteDrawer) {
return EntryType.DRAWER;
- } else if(entry instanceof PaletteSeparator) {
+ } else if (entry instanceof PaletteSeparator) {
return EntryType.SEPARATOR;
- } else if(entry instanceof PaletteStack) {
+ } else if (entry instanceof PaletteStack) {
return EntryType.STACK;
- } else if(entry instanceof AspectCreationEntry) {
+ } else if (entry instanceof AspectCreationEntry) {
return EntryType.ASPECT_TOOL;
- } else if(entry instanceof ToolEntry) {
+ } else if (entry instanceof ToolEntry) {
return EntryType.TOOL;
}
return EntryType.TOOL;
@@ -109,7 +109,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* returns the label of the cached entry
- *
+ *
* @return the label of the cached entry
*/
public String getLabel() {
@@ -118,7 +118,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* returns the id of the cached entry
- *
+ *
* @return the id of the cached entry
*/
public String getId() {
@@ -127,7 +127,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* returns the small icon of the cached entry
- *
+ *
* @return the small icon of the cached entry
*/
public Image getImage() {
@@ -136,7 +136,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* returns the description of this entry proxy
- *
+ *
* @return the description of this entry proxy
*/
public String getDescription() {
@@ -145,7 +145,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* returns the image path of this entry proxy
- *
+ *
* @return the image path of this entry proxy
*/
public String getImagePath() {
@@ -154,9 +154,9 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Sets the parent for this proxy
- *
+ *
* @param newParent
- * the parent proxy
+ * the parent proxy
*/
public void setParent(PaletteContainerProxy newParent) {
parent = newParent;
@@ -164,7 +164,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Returns the parent of this proxy
- *
+ *
* @return the parent of this proxy
*/
public PaletteContainerProxy getParent() {
@@ -173,7 +173,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Returns the list of children for this entry. By default, entries do not have children.
- *
+ *
* @return the list of children for this entry
*/
public List<PaletteEntryProxy> getChildren() {
@@ -182,9 +182,9 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Sets the king of tool it is.
- *
+ *
* @param type
- * the type to set
+ * the type to set
*/
public void setType(EntryType type) {
this.type = type;
@@ -192,7 +192,7 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Returns the kind of entry
- *
+ *
* @return the kind of entry
*/
public EntryType getType() {
@@ -201,21 +201,21 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Sets the description of the palette entry proxied by this element
- *
+ *
* @param desc
- * the new description
+ * the new description
*/
public void setDescription(String desc) {
- if(getEntry() == null) {
+ if (getEntry() == null) {
return;
}
String oldDesc = getEntry().getDescription();
- if(oldDesc == null && desc == null) {
+ if (oldDesc == null && desc == null) {
return;
}
- if(desc == null || !desc.equals(oldDesc)) {
+ if (desc == null || !desc.equals(oldDesc)) {
getEntry().setDescription(desc);
listeners.firePropertyChange(PaletteEntry.PROPERTY_DESCRIPTION, oldDesc, desc);
}
@@ -223,21 +223,21 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Sets the label of the palette entry proxied by this element
- *
+ *
* @param label
- * the new label
+ * the new label
*/
public void setLabel(String label) {
- if(getEntry() == null) {
+ if (getEntry() == null) {
return;
}
String oldLabel = getEntry().getLabel();
- if(oldLabel == null && label == null) {
+ if (oldLabel == null && label == null) {
return;
}
- if(label == null || !label.equals(oldLabel)) {
+ if (label == null || !label.equals(oldLabel)) {
getEntry().setLabel(label);
listeners.firePropertyChange(PaletteEntry.PROPERTY_LABEL, oldLabel, label);
}
@@ -245,31 +245,31 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Sets the label of the palette entry proxied by this element
- *
+ *
* @param label
- * the new label
+ * the new label
*/
public void setIcon(String path) {
- if(!(getEntry() instanceof AspectCreationEntry)) {
+ if (!(getEntry() instanceof AspectCreationEntry)) {
return;
}
- String oldPath = ((AspectCreationEntry)getEntry()).getIconPath();
+ String oldPath = ((AspectCreationEntry) getEntry()).getIconPath();
- if(oldPath == null && path == null) {
+ if (oldPath == null && path == null) {
return;
}
- if(path == null || !path.equals(oldPath)) {
- ((AspectCreationEntry)getEntry()).setIconPath(path);
+ if (path == null || !path.equals(oldPath)) {
+ ((AspectCreationEntry) getEntry()).setIconPath(path);
listeners.firePropertyChange(PROPERTY_ICON_PATH, oldPath, path);
}
}
/**
* Method to add a child proxy to this proxy
- *
+ *
* @param entry
- * the entry to add
+ * the entry to add
*/
protected void addChild(PaletteEntryProxy entry) {
listeners.firePropertyChange(PROPERTY_ADD_CHILDREN, null, entry);
@@ -277,11 +277,11 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Method to add a child proxy to this proxy, before the given element
- *
+ *
* @param entry
- * the entry to add
+ * the entry to add
* @param nextElement
- * the element that should be just after the entry
+ * the element that should be just after the entry
*/
protected void addChild(PaletteEntryProxy entry, PaletteEntryProxy nextElement) {
listeners.firePropertyChange(PROPERTY_ADD_CHILDREN, null, entry);
@@ -289,9 +289,9 @@ public class PaletteEntryProxy implements IPaletteEntryProxy {
/**
* Remove the specified children from its parent
- *
+ *
* @param proxy
- * the proxy to remove
+ * the proxy to remove
*/
public void removeChild(PaletteEntryProxy proxy) {
listeners.firePropertyChange(PROPERTY_REMOVE_CHILDREN, proxy, null);

Back to the top