Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Make non SmartGWT component draggable

    Hello,

    My GUI is mainly composed of 2 things :

    - HTMLPane on the left side
    - SectionStack on the right side

    I had to find a way of allowing DND funcionalities between the text of the HTMLPane and the SectionStackSection items. To accomplish this, I've added a TextItem as SectionStackSection header control.

    I managed to be notified (through addChangedHandler on the TextItem) when the user selects some text on the left, and then Drag and drop the context in the TextItem.

    What I'm trying to do is to remove this TextItem and add these capabilities to the sectionStackSection header directly.

    I've already tried to look into some DOM or GWT native events, but without success.

    May I have some guidelines ?

    I'm using SmartGWT 2.5

    Best Regards

    EDIT :

    This code works with GWT only :

    Code:
    TextArea text = new TextArea();
    		SimplePanel panel = new SimplePanel(text);
    
    		TextArea text2 = new TextArea();
    		SimplePanel panel2 = new SimplePanel(text2);
    
    		Button button = new Button("button");
    		button.addDragOverHandler(new DragOverHandler()
    		{
    
    			@Override
    			public void onDragOver(DragOverEvent event)
    			{
    				GWT.log("onDragOver");
    			}
    		});
    
    		RootPanel.get().add(panel);
    		RootPanel.get().add(panel2);
    		RootPanel.get().add(button);
    But this, doesn't work with a SectionStack :

    Code:
    section.getSectionHeader().addDropOverHandler(new DropOverHandler()
    		{
    			
    			@Override
    			public void onDropOver(DropOverEvent event)
    			{
    				SC.say("Over");
    				GWT.log("Over");
    				
    			}
    		});
    Last edited by jmichelgarcia; 6 Jun 2012, 08:58.

    #2
    any ideas ?

    Comment

    Working...
    X