|
|
Re: setMaximumSize [message #670369 is a reply to message #669568] |
Fri, 13 May 2011 17:23 |
Elvis Messages: 15 Registered: May 2011 |
Junior Member |
|
|
Hi Antonio,
Thanks for the help, the issue is that I'm not able to use the method "setMaximumSize" the method "setMinimumSize" works correctly: can't reduce the element beyond what is allowed. Already the method "setMaximumSize(new Dimension(getMapMode().DPtoLP(300), getMapMode().DPtoLP(200)));" not prevent the extension of the element to the size of 600 x 400 for example.
Down the BoxEditPart (XXX.diagram.edit.parts):
/**
* @generated
*/
public class BoxFigure extends RectangleFigure {
/**
* @generated
*/
private WrappingLabel fFigureBoxLabelFigure;
/**
* @generated NOT
*/
public BoxFigure() {
this.setPreferredSize(new Dimension(getMapMode().DPtoLP(100),
getMapMode().DPtoLP(50)));
this.setBorder(new MarginBorder(getMapMode().DPtoLP(5),
getMapMode().DPtoLP(5), getMapMode().DPtoLP(5),
getMapMode().DPtoLP(5)));
this.setMinimumSize(new Dimension(getMapMode().DPtoLP(150),
getMapMode().DPtoLP(100)));
this.setMaximumSize(new Dimension(getMapMode().DPtoLP(300),
getMapMode().DPtoLP(200)));
createContents();
}
/**
* @generated
*/
private void createContents() {
fFigureBoxLabelFigure = new WrappingLabel();
fFigureBoxLabelFigure.setText("Box");
this.add(fFigureBoxLabelFigure);
}
/**
* @generated
*/
public WrappingLabel getFigureBoxLabelFigure() {
return fFigureBoxLabelFigure;
}
}
|
|
|
Re: setMaximumSize [message #670385 is a reply to message #670369] |
Fri, 13 May 2011 18:41 |
|
Hi Elvis,
Your problem seems to be specific to GEF. I think you'll get a much better answer if you ask your question at the GEF forum. You see, the Eugenia tool in Epsilon only generates the GMF models: the actual code is produced by GMF, and this code relies on the Graphical Editing Framework (GEF).
|
|
|
|
Powered by
FUDForum. Page generated in 0.03448 seconds