Author: tfmorris
Date: 2007-11-11 02:29:40-0800
New Revision: 13753
Modified:
trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelCompositeState.java
trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelPseudostate.java
trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelSubmachineState.java
Log:
Issue 4905 - Fix translation of names for property panels
Modified: trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelCompositeState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelCompositeState.java?view=diff&rev=13753&p1=trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelCompositeState.java&p2=trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelCompositeState.java&r1=13752&r2=13753
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelCompositeState.java (original)
+++ trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelCompositeState.java 2007-11-11 02:29:40-0800
@@ -29,6 +29,7 @@
import javax.swing.JList;
import javax.swing.JScrollPane;
+import org.argouml.i18n.Translator;
import org.argouml.model.Model;
import org.argouml.ui.targetmanager.TargetManager;
import org.argouml.uml.diagram.ui.ActionAddConcurrentRegion;
@@ -47,7 +48,7 @@
* The serial version.
*/
private static final long serialVersionUID = 4758716706184949796L;
-
+
private JList subverticesList = null;
private Action addConcurrentRegion;
private Action deleteConcurrentRegion;
@@ -58,8 +59,8 @@
* @param icon the icon to be shown next to the name
* @param orientation the orientation of the panel
*/
- public PropPanelCompositeState(String name, ImageIcon icon,
- Orientation orientation) {
+ public PropPanelCompositeState(final String name, final ImageIcon icon,
+ final Orientation orientation) {
super(name, icon, orientation);
initialize();
}
@@ -104,6 +105,7 @@
/*
* @see org.argouml.uml.ui.behavior.state_machines.PropPanelStateVertex#addExtraButtons()
*/
+ @Override
protected void addExtraButtons() {
super.addExtraButtons();
addConcurrentRegion = new ActionAddConcurrentRegion();
@@ -111,7 +113,7 @@
deleteConcurrentRegion = new ActionDeleteConcurrentRegion();
addAction(deleteConcurrentRegion);
}
-
+
protected void updateExtraButtons() {
addConcurrentRegion.setEnabled(addConcurrentRegion.isEnabled());
deleteConcurrentRegion.setEnabled(deleteConcurrentRegion.isEnabled());
@@ -130,20 +132,24 @@
/*
* @see org.argouml.uml.ui.PropPanel#setTarget(java.lang.Object)
*/
- public void setTarget(Object t) {
+ @Override
+ public void setTarget(final Object t) {
super.setTarget(t);
updateExtraButtons();
- Object target = TargetManager.getInstance().getModelTarget();
+ final Object target = TargetManager.getInstance().getModelTarget();
if (Model.getFacade().isAConcurrentRegion(target)) {
- getTitleLabel().setText("label.concurrent.region");
+ getTitleLabel().setText(
+ Translator.localize("label.concurrent.region"));
} else if (Model.getFacade().isConcurrent(target)) {
- getTitleLabel().setText("label.concurrent.composite.state");
+ getTitleLabel().setText(
+ Translator.localize("label.concurrent.composite.state"));
} else {
- getTitleLabel().setText("label.composite-state");
+ getTitleLabel().setText(
+ Translator.localize("label.composite-state"));
}
}
-} /* end class PropPanelCompositeState */
+}
Modified: trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelPseudostate.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelPseudostate.java?view=diff&rev=13753&p1=trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelPseudostate.java&p2=trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelPseudostate.java&r1=13752&r2=13753
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelPseudostate.java (original)
+++ trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelPseudostate.java 2007-11-11 02:29:40-0800
@@ -82,27 +82,33 @@
}
if (Model.getFacade().equalsPseudostateKind(kind,
Model.getPseudostateKind().getJoin())) {
- getTitleLabel().setText("label.pseudostate.join");
+ getTitleLabel().setText(
+ Translator.localize("label.pseudostate.join"));
}
if (Model.getFacade().equalsPseudostateKind(kind,
Model.getPseudostateKind().getChoice())) {
- getTitleLabel().setText("label.pseudostate.choice");
+ getTitleLabel().setText(
+ Translator.localize("label.pseudostate.choice"));
}
if (Model.getFacade().equalsPseudostateKind(kind,
Model.getPseudostateKind().getDeepHistory())) {
- getTitleLabel().setText("label.pseudostate.deephistory");
+ getTitleLabel().setText(
+ Translator.localize("label.pseudostate.deephistory"));
}
if (Model.getFacade().equalsPseudostateKind(kind,
Model.getPseudostateKind().getShallowHistory())) {
- getTitleLabel().setText("label.pseudostate.shallowhistory");
+ getTitleLabel().setText(
+ Translator.localize("label.pseudostate.shallowhistory"));
}
if (Model.getFacade().equalsPseudostateKind(kind,
Model.getPseudostateKind().getInitial())) {
- getTitleLabel().setText("label.pseudostate.initial");
+ getTitleLabel().setText(
+ Translator.localize("label.pseudostate.initial"));
}
if (Model.getFacade().equalsPseudostateKind(kind,
Model.getPseudostateKind().getJunction())) {
- getTitleLabel().setText("label.pseudostate.junction");
+ getTitleLabel().setText(
+ Translator.localize("label.pseudostate.junction"));
}
Icon icon =
ResourceLoaderWrapper.getInstance().lookupIcon(target);
Modified: trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelSubmachineState.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelSubmachineState.java?view=diff&rev=13753&p1=trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelSubmachineState.java&p2=trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelSubmachineState.java&r1=13752&r2=13753
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelSubmachineState.java (original)
+++ trunk/src_new/org/argouml/uml/ui/behavior/state_machines/PropPanelSubmachineState.java 2007-11-11 02:29:40-0800
@@ -29,9 +29,6 @@
import javax.swing.JScrollPane;
import org.argouml.i18n.Translator;
-import org.argouml.model.Model;
-import org.argouml.ui.targetmanager.TargetEvent;
-import org.argouml.ui.targetmanager.TargetManager;
import org.argouml.uml.ui.UMLComboBox2;
import org.argouml.uml.ui.UMLComboBoxNavigator;
import org.argouml.uml.ui.UMLMutableLinkedList;
@@ -52,7 +49,7 @@
/**
* Construct a property panel for SubmachineState elements with the given
* params.
- *
+ *
* @param name
* the name of the properties panel
* @param icon
@@ -60,8 +57,8 @@
* @param orientation
* the orientation of the panel
*/
- public PropPanelSubmachineState(String name, ImageIcon icon,
- Orientation orientation) {
+ public PropPanelSubmachineState(final String name, final ImageIcon icon,
+ final Orientation orientation) {
super(name, icon, orientation);
initialize();
}
@@ -72,12 +69,11 @@
public PropPanelSubmachineState() {
super("label.submachinestate", lookupIcon("SubmachineState"),
ConfigLoader.getTabPropsOrientation());
- getTitleLabel().setText("label.submachinestate");
addField("label.name",
getNameTextField());
addField("label.container",
getContainerScroll());
- JComboBox submachineBox = new UMLComboBox2(
+ final JComboBox submachineBox = new UMLComboBox2(
new UMLSubmachineStateComboBoxModel(),
ActionSetSubmachineStateSubmachine.getInstance());
addField("label.submachine",
@@ -110,6 +106,7 @@
/*
* @see org.argouml.uml.ui.behavior.state_machines.PropPanelStateVertex#addExtraButtons()
*/
+ @Override
protected void addExtraButtons() {
// Intentionally do nothing.
}
@@ -117,26 +114,10 @@
/*
* @see org.argouml.uml.ui.behavior.state_machines.PropPanelCompositeState#updateExtraButtons()
*/
+ @Override
protected void updateExtraButtons() {
// Intentionally do nothing.
}
- /*
- * @see org.argouml.ui.targetmanager.TargetListener#targetSet(org.argouml.ui.targetmanager.TargetEvent)
- */
- public void targetSet(TargetEvent e) {
- super.targetSet(e);
- if (e != null) {
- Object source = e.getSource();
- if (source != null
- && source instanceof TargetManager) {
- Object target =
- ((TargetManager) e.getSource()).getModelTarget();
- if (Model.getFacade().isASubmachineState(target)) {
- getTitleLabel().setText("label.submachinestate");
- }
- }
- }
- }
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.