[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ve-dev] Custom GraphicalEditPart
|
I am customizing VE so that I can visually develop applications that use concurrent processing (CSP).
This involves Swing components that need to be wired together using channels.
I intend to subclass GEF's ConnectEditParts to represent the channels but first I need to be able to visually represent my GUI.
A very simplified example of the GUI code would be;-
public class Mygui extends GUI {
@Override
public void createAndWire() {
JLabel jLabel = new JLabel();
jLabel.setText("My Label");
JPanel p = new JPanel();
p.add(jLabel);
setContentPanel(p);
}
}
I would like to represent the GUI class visually as a bordered rectangle. Inside the rectangle I would like to display the image of the ContentPanel property.
So far I have a GUIGraphicalEditPart that displays my GUI 'box'. The GUIGraphicalEditPart also has a child ContainerGraphicalEditPart that has the JPanel as its model.
I have set the ContainerGrpahicalEditPart for the Panel to transparent=false but it still doesn't show up on the canvas.
Have I missed something important? Is this the right way to go about it?
Thanks,
Cathy Scott