Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to get properties element in EditPart programatically?
How to get properties element in EditPart programatically? [message #908789] Wed, 05 September 2012 22:16 Go to next message
Eclipse UserFriend
Hello, How to get properties element in EditPart programatically? suppose i have a node NODE1 and it have some properties like name, size, startTime etc....what i am trying to do is in EditParts i will put some constrains. to do so i need to know what are the values of the elements. so is there any way or function that can get the values of the property elements?

thnxx
Re: How to get properties element in EditPart programatically? [message #908890 is a reply to message #908789] Thu, 06 September 2012 03:25 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

use XXXEditPart.resolveSematicElement() and then navigate to your properties.

Regards,
Re: How to get properties element in EditPart programatically? [message #938875 is a reply to message #908890] Wed, 10 October 2012 04:28 Go to previous messageGo to next message
Eclipse UserFriend
anyone else can help?
Re: How to get properties element in EditPart programatically? [message #938879 is a reply to message #938875] Wed, 10 October 2012 04:31 Go to previous message
Eclipse UserFriend
public class SFPDPFigure extends RectangleFigure {
private WrappingLabel fFigureSFPDPNameFigure;
public SFPDPFigure() {

FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);

layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);

this.setLayoutManager(layoutThis);

**** if(value ==1) then setBackgroundColor is is light gray and else color is red**************
this.setBackgroundColor(ColorConstants.lightGray);
this.setBorder(new LineBorder(ColorConstants.black, getMapMode()
.DPtoLP(1)));
createContents();

}


this is a sample of my code. the line with **** means value is a attribute of sFPDP node and i need to change background color of sFPDP by value. but problem is how i can i read value??
Previous Topic:Date and timezones
Next Topic:OpenDiagramEditPolicy
Goto Forum:
  


Current Time: Mon Jul 07 21:07:33 EDT 2025

Powered by FUDForum. Page generated in 0.06829 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top