svn commit: r13555 - trunk/src_new/org/argouml: i18n uml/diagram/ui

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-09-17 12:54:29-0700
New Revision: 13555

Modified:
   trunk/src_new/org/argouml/i18n/label.properties
   trunk/src_new/org/argouml/uml/diagram/ui/PropPanelString.java

Log:
Localize.  Format.  Add implementations for autogenerated stubs.

Modified: trunk/src_new/org/argouml/i18n/label.properties
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/i18n/label.properties?view=diff&rev=13555&p1=trunk/src_new/org/argouml/i18n/label.properties&p2=trunk/src_new/org/argouml/i18n/label.properties&r1=13554&r2=13555
==============================================================================
--- trunk/src_new/org/argouml/i18n/label.properties	(original)
+++ trunk/src_new/org/argouml/i18n/label.properties	2007-09-17 12:54:29-0700
@@ -362,6 +362,7 @@
 label.target = Target
 label.target-flows = Target Flows:
 label.targetscope-classifier = static
+label.text = Text:
 label.time.event=Time event
 label.todo-pane = ToDo Pane
 label.todopane.item = {0} Item

Modified: trunk/src_new/org/argouml/uml/diagram/ui/PropPanelString.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ui/PropPanelString.java?view=diff&rev=13555&p1=trunk/src_new/org/argouml/uml/diagram/ui/PropPanelString.java&p2=trunk/src_new/org/argouml/uml/diagram/ui/PropPanelString.java&r1=13554&r2=13555
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ui/PropPanelString.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/ui/PropPanelString.java	2007-09-17 12:54:29-0700
@@ -33,6 +33,7 @@
 import javax.swing.event.DocumentEvent;
 import javax.swing.event.DocumentListener;
 
+import org.argouml.i18n.Translator;
 import org.argouml.ui.AbstractArgoJPanel;
 import org.argouml.ui.targetmanager.TargetEvent;
 import org.argouml.uml.ui.TabModelTarget;
@@ -46,10 +47,9 @@
 public class PropPanelString
     extends AbstractArgoJPanel
     implements TabModelTarget, PropertyChangeListener, DocumentListener {
-    ////////////////////////////////////////////////////////////////
-    // instance vars
+
     private FigText target;
-    private JLabel nameLabel = new JLabel("Text: ");
+    private JLabel nameLabel = new JLabel(Translator.localize("label.text"));
     private JTextField nameField = new JTextField();
 
     /**
@@ -57,7 +57,7 @@
      *
      */
     public PropPanelString() {
-	super("String");
+	super(Translator.localize("tab.string"));
 	GridBagLayout gb = new GridBagLayout();
 	setLayout(gb);
 	GridBagConstraints c = new GridBagConstraints();
@@ -85,8 +85,6 @@
 
     }
 
-    ////////////////////////////////////////////////////////////////
-    // accessors
 
     /*
      * @see org.argouml.ui.TabTarget#setTarget(java.lang.Object)
@@ -94,7 +92,7 @@
     public void setTarget(Object t) {
 	if (t instanceof FigText) {
 	    target = (FigText) t;
-	    // to circumvent to much registred listeners
+	    // to circumvent too many registered listeners
 	    target.removePropertyChangeListener(this);
 	    target.addPropertyChangeListener(this);
 	}
@@ -104,12 +102,16 @@
     /*
      * @see org.argouml.ui.TabTarget#getTarget()
      */
-    public Object getTarget() { return target; }
+    public Object getTarget() {
+        return target;
+    }
 
     /*
      * @see org.argouml.ui.TabTarget#refresh()
      */
-    public void refresh() { setTarget(target); }
+    public void refresh() {
+        setTarget(target);
+    }
 
     /*
      * @see org.argouml.ui.TabTarget#shouldBeEnabled(java.lang.Object)
@@ -139,7 +141,9 @@
     /*
      * @see javax.swing.event.DocumentListener#removeUpdate(javax.swing.event.DocumentEvent)
      */
-    public void removeUpdate(DocumentEvent e) { insertUpdate(e); }
+    public void removeUpdate(DocumentEvent e) {
+        insertUpdate(e);
+    }
 
     /*
      * @see javax.swing.event.DocumentListener#changedUpdate(javax.swing.event.DocumentEvent)
@@ -163,24 +167,21 @@
      * @see org.argouml.ui.targetmanager.TargetListener#targetAdded(org.argouml.ui.targetmanager.TargetEvent)
      */
     public void targetAdded(TargetEvent e) {
-        // TODO: Auto-generated method stub
-
+        setTarget(e.getNewTarget());
     }
 
     /*
      * @see org.argouml.ui.targetmanager.TargetListener#targetRemoved(org.argouml.ui.targetmanager.TargetEvent)
      */
     public void targetRemoved(TargetEvent e) {
-        // TODO: Auto-generated method stub
-
+        setTarget(e.getNewTarget());
     }
 
     /*
      * @see org.argouml.ui.targetmanager.TargetListener#targetSet(org.argouml.ui.targetmanager.TargetEvent)
      */
     public void targetSet(TargetEvent e) {
-        // TODO: Auto-generated method stub
-
+        setTarget(e.getNewTarget());
     }
 
-} /* end class PropPanelString */
+}
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.