Writing a Java class for custom figures [message #212165] |
Sun, 19 March 2006 15:19 |
Eclipse User |
|
|
|
Originally posted by: a.farquea.gmail.com
Firstly i am using GMF but i wondered if anyone on here could help me with
this problem as i am just wanting to implement my own graphical figures by
creating some java classes.
I am attempting to implement a class which will allow me to load jpg's
into my gmfgraph via selecting a custom Figure and entering the
appropriate data into its field so that it uses my customfigure class.
However i am unsure as to what code i need in order to do this. I was
hoping someone could give me some help as to how the setImagePath method
should be written if possible, or a quick sample of code i can use and
adapt as i work;
/**
* */
package com.facetarch.figures;
import org.eclipse.swt.graphics.Image;
import org.eclipse.draw2d.ImageFigure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.draw2d.geometry.Rectangle;
/**
* @author Farquea
*
*/
public class CustomFigure extends ImageFigure {
/**
* */
public CustomFigure() {
super();
}
public void setImagePath(String)
{
}
}
Date Subject
|
|
|
|
Powered by
FUDForum. Page generated in 0.02273 seconds