Try dropping the import and use addSeparator()
instead of add(LabelledLayout.getSeperator()); 2009/1/18 Zoran Jeremic <[email protected]>: > My package name is > > package depths.uml.ui.model_management; > > I have developed module that extends ArgoUML. > > Zoran > > ----- Original Message ----- > From: Bob Tarling <[email protected]> > To: [email protected] > Cc: dev <[email protected]> > Date: Sun, 18 Jan 2009 21:39:56 +0000 > Subject: Re: [argouml-dev] Problem with LabelledLayout class > >> What is your package name? >> >> Your not by any chance sharing argoumls namepsace? >> >> Bob >> >> 2009/1/18 Zoran Jeremic <[email protected]>: >> > Hi Bob, >> > >> > Thanks for your answer, but I'm not sure if I have understood your >> > suggestions. >> > >> > I have used swidget version add(LabelledLayout.getSeperator()); earlier and >> > it worked fine. However, after transfer to new ArgoUML version there was no >> > error in code, but elements were not arranged in two columns any more. I >> > have tried to use ArgoUML's version, but I can use it only if I make >> > LabelledLayout to be public. In that case it works fine, but I don't want >> > to >> > change ArgoUML code. >> > >> > Here is the code I have implemented: >> > >> > import javax.swing.ImageIcon; >> > import javax.swing.JScrollPane; >> > import org.argouml.application.api.Argo; >> > import org.argouml.configuration.Configuration; >> > import org.argouml.i18n.Translator; >> > import org.argouml.swingext.UpArrowIcon; >> > import org.argouml.uml.ui.PropPanel; >> > import org.argouml.uml.ui.UMLDeprecatedCheckBox; >> > import org.argouml.uml.ui.UMLModelElementCommentDocument; >> > import org.argouml.uml.ui.UMLModelElementTaggedValueDocument; >> > import org.argouml.uml.ui.UMLTextArea2; >> > import org.argouml.uml.ui.UMLTextField2; >> > import org.tigris.swidgets.Horizontal; >> > import org.tigris.swidgets.LabelledLayout; >> > import org.tigris.swidgets.Vertical; >> > import depths.application.api.DepthsArgo; >> > import depths.i18n.DepthsTranslator; >> > public class DepthsPropPanelPackage extends PropPanel{ >> > >> > private static String orientation = Configuration.getString(Configuration >> > .makeKey("layout", "tabdocumentation")); >> > UMLTextArea2 description,designRules, >> > designConstraints,additionalRequirements, >> > consequences, pros, cons; >> > >> > protected DepthsPropPanelPackage(String diagramName, ImageIcon icon) { >> > super(diagramName, (ImageIcon) null); >> > setOrientation(( >> > orientation.equals("West") || orientation.equals("East")) >> > ? Vertical.getInstance() : Horizontal.getInstance()); >> > setIcon(new UpArrowIcon()); >> > description = new UMLTextArea2( >> > new >> > UMLModelElementTaggedValueDocument(DepthsArgo.DESCRIPTION_TAG)); >> > description.setRows(2); >> > description.setLineWrap(true); >> > description.setWrapStyleWord(true); >> > JScrollPane spDescription = new JScrollPane(); >> > spDescription.getViewport().add(description); >> > addField(DepthsTranslator.localize("depths_label.description"), >> > spDescription); >> > >> > //I have omit two elements as the above one >> > >> > //make new column with LabelledLayout >> > add(LabelledLayout.getSeperator()); >> > >> > consequences = new UMLTextArea2( >> > new >> > UMLModelElementTaggedValueDocument(DepthsArgo.CONSEQUENCES_TAG)); >> > consequences.setRows(2); >> > consequences.setLineWrap(true); >> > consequences.setWrapStyleWord(true); >> > JScrollPane spConsequences = new JScrollPane(); >> > spConsequences.getViewport().add(consequences); >> > addField(DepthsTranslator.localize("depths_label.consequences"), >> > spConsequences); >> > >> > >> > --- On Sun, 1/18/09, Bob Tarling <[email protected]> wrote: >> > >> > From: Bob Tarling <[email protected]> >> > Subject: Re: [argouml-dev] Problem with LabelledLayout class >> > To: [email protected] >> > Date: Sunday, January 18, 2009, 1:09 PM >> > >> > Sorry for the delay in replying here. >> > >> > During last years GSOC we moved LabelledLayout from swidgets into >> > ArgoUML so that we could make some ArgoUML specific changes. >> > >> > You should be able to continue to use the swidgets version with no >> > other changes. >> > >> > If you do want to use the ArgoUML version then be careful to make sure >> > that you are not mixing the Separator from swidgets with our version. >> > They don't recognise each other. >> > >> > Regards >> > >> > Bob. >> > >> > 2009/1/17 Zoran Jeremic <[email protected]>: >> >> Hi everybody, >> >> >> >> I need a little help about how to use method getSeparator() >> >> from org.argouml.uml.ui.LabelledLayout. I have created several months ago >> > a >> >> property tab similar as Documentation tab that has 7 UMLTextArea2 fields >> > in >> >> two columns. It worked fine unitl I shifted from version 0.25.5 PRE to >> >> version 0.26.2. Now all fields are in one column. There is >> >> add(LabelledLayout. >> > getSeparator()); >> >> after the fourth element but it does not add new column. There is >> >> yet another class LabelledLayout in org.tigris.swidgets that has method >> >> getSeperator(), but it also does not work. Do you have any suggestions how >> >> to solve this issue? >> >> >> >> Thanks, >> >> Zoran >> >> >> > >> > ------------------------------------------------------ >> > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1033288 >> > >> > To unsubscribe from this discussion, e-mail: >> > [[email protected]]. >> > >> > >> > > > > > ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1033503 To unsubscribe from this discussion, e-mail: [[email protected]].
