Skip to main content



      Home
Home » Eclipse Projects » GEF » Urgent help needed!! Removing component
Urgent help needed!! Removing component [message #86127] Tue, 01 July 2003 10:29 Go to next message
Eclipse UserFriend
Originally posted by: ar9357.sbc.com

Using the call getGraphicalViewer().setContents(logicDiagram);
iam able to place a component(new diagram) on the Editor.
How do i remove all the component which are already on the Editor, before
adding any components.
Re: Urgent help needed!! Removing component [message #86143 is a reply to message #86127] Tue, 01 July 2003 11:04 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C33FC0.8A355E90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I didn't have any trouble hacking the LogicEditor to replace hte =
contents of the viewer:

protected KeyHandler getCommonKeyHandler(){
if (sharedKeyHandler =3D=3D null){
sharedKeyHandler =3D new KeyHandler();
sharedKeyHandler.put(
KeyStroke.getPressed('4', 0),
new Action() {
public void run() {
=
getGraphicalViewer().setContents(LogicDiagramFactory.createL argeModel());=

}
});
...

This worked fine for me. I press the key 4, and the 4-bit adder diagram =
is replaced into the graphical view.

"Anil" <ar9357@sbc.com> wrote in message =
news:bds5rt$8gi$1@rogue.oti.com...
> Using the call getGraphicalViewer().setContents(logicDiagram);
> iam able to place a component(new diagram) on the Editor.
> How do i remove all the component which are already on the Editor, =
before
> adding any components.
>=20
>=20
>=20

------=_NextPart_000_0008_01C33FC0.8A355E90
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2723.2500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I didn't have any trouble hacking the =
LogicEditor=20
to replace hte contents of the viewer:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>protected KeyHandler=20
getCommonKeyHandler(){<BR>&nbsp;if (sharedKeyHandler =3D=3D=20
null){<BR>&nbsp;&nbsp;sharedKeyHandler =3D new=20
KeyHandler();<BR>&nbsp;&nbsp;sharedKeyHandler.put( <BR>&nbsp;&nbsp;&nbsp;K=
eyStroke.getPressed('4',=20
0),<BR>&nbsp;&nbsp;&nbsp;new Action() =
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;public void=20
run()=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getGraphic alViewer().setContents(Logic=
DiagramFactory.createLargeModel());<BR>&nbsp;&nbsp;&nbsp;&nbsp;} <BR>&nbsp=
;&nbsp;&nbsp;});<BR>&nbsp;&nbsp;&nbsp;... </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This worked fine for me.&nbsp; I press =
the key 4,=20
and the 4-bit adder diagram is replaced into the graphical =
view.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Anil" &lt;</FONT><A=20
href=3D"mailto:ar9357@sbc.com"><FONT face=3DArial=20
size=3D2>ar9357@sbc.com</FONT></A><FONT face=3DArial size=3D2>&gt; wrote =
in message=20
</FONT><A href=3D"news:bds5rt$8gi$1@rogue.oti.com"><FONT face=3DArial=20
size=3D2>news:bds5rt$8gi$1@rogue.oti.com</FONT></A><FONT face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; Using the call =

getGraphicalViewer().setContents(logicDiagram);<BR>&gt; iam able to =
place a=20
component(new diagram) on the Editor.<BR>&gt; How do i remove all the =
component=20
which are already on the Editor, before<BR>&gt; adding any =
components.<BR>&gt;=20
<BR>&gt; <BR>&gt; </FONT></BODY></HTML>

------=_NextPart_000_0008_01C33FC0.8A355E90--
Previous Topic:Simulate ConnectionCreationTool from within EditPart
Next Topic:[REPOST] Keyboard shortcuts not working in Multipageeditor
Goto Forum:
  


Current Time: Thu May 08 18:59:23 EDT 2025

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

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

Back to the top