Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Hide/Show Compartment Command
Hide/Show Compartment Command [message #64202] Tue, 17 October 2006 14:17 Go to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

I need to show and hide compartment view dinamically.
I'm developing a Use Case Diagram Editor. When I create a extend
relationship between 2 usecases, I would to create show the compartment
view containing the extension points.
How can I show or hide the compartment view at the creation of a
extension point?

Thanks.
Re: Hide/Show Compartment Command [message #64521 is a reply to message #64202] Tue, 17 October 2006 16:35 Go to previous message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

On Tue, 17 Oct 2006 16:17:14 +0200, user wrote:

> I need to show and hide compartment view dinamically.
> I'm developing a Use Case Diagram Editor. When I create a extend
> relationship between 2 usecases, I would to create show the compartment
> view containing the extension points.
> How can I show or hide the compartment view at the creation of a
> extension point?
>
> Thanks.

Looking for this in ResizableCompartmentEditPart:

protected void handleNotificationEvent(Notification event ) {
Object feature = event.getFeature();
if (NotationPackage.eINSTANCE.getRatio_Value().equals(feature)
|| event.getOldValue()instanceof Ratio
|| event.getNewValue() instanceof Ratio)
refreshRatio();
else if (NotationPackage.eINSTANCE.getDrawerStyle_Collapsed().equals (feature)){
setCollapsed(event.getNewBooleanValue(), true);
this.getFigure().revalidate();
} else if (NotationPackage.eINSTANCE.getTitleStyle_ShowTitle().equals( feature))
setShowCompartmentTitle(event.getNewBooleanValue());
else if (NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(f eature)){
Integer c = (Integer) event.getNewValue();
setFontColor(DiagramColorRegistry.getInstance().getColor(c)) ;
}

tells you can use an AbstractTransactionalCommand that calls
GraphicalEditPart#setStructuralFeatureValue with the correct feature.

vlad
Previous Topic:Diagram type-ing
Next Topic:How to use LeftRightProvider ?
Goto Forum:
  


Current Time: Wed Sep 18 16:53:47 GMT 2024

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

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

Back to the top