Hide/Show Compartment Command [message #64202] |
Tue, 17 October 2006 14:17 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03278 seconds