pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camilo Casadiego <Camilo.Casadi...@adv.co>
Subject Drag and drop
Date Thu, 18 Aug 2011 20:23:20 GMT
Hi there! I'm trying to build an apparently simple component, the idea is to have a Panel,
and a contextual menu, the main idea is that the contextual menu should popup one option and
when I click the option a new small Panel (or whatever container which could have more components
inside) should apear in place, this has to be dragable inside the container panel.

Until the menu I have  succeed, but when I try to add a new Panel defined like this:

<?xml version="1.0" encoding="UTF-8"?>
<canvas:ItemCanvasController xmlns:bxml="http://pivot.apache.org/bxml"
      xmlns="org.apache.pivot.wtk" xmlns:canvas="co.com.adv.salarixII.ui.controller.canvas">

      <Border bxml:id="itemBorder" title="Nombre Item" styles="{padding:1}"
            xmlns:bxml="http://pivot.apache.org/bxml" xmlns="org.apache.pivot.wtk">
            <TabPane>
                  <Label bxml:id="titleLabel" text="Titulo"
                        styles="{horizontalAlignment:'center',
            verticalAlignment:'center', wrapText:true}" />
                  <Label bxml:id="contentLabel" text="Contenido"
                        styles="{horizontalAlignment:'center',
            verticalAlignment:'center', wrapText:true}" />
                  <!-- <Label bxml:id="lContent" text="Contenido" styles="{horizontalAlignment:'left',
                        verticalAlignment:'center', wrapText:true}"/> -->
            </TabPane>
      </Border>
</canvas:ItemCanvasController>

he declaration of the managing class goes like this:

public class ItemCanvasController extends Panel implements Bindable

and the main panel is defined like this:

<?xml version="1.0" encoding="UTF-8"?>
<canvas:CanvasController xmlns:bxml="http://pivot.apache.org/bxml"
      xmlns="org.apache.pivot.wtk" xmlns:canvas="co.com.adv.salarixII.ui.controller.canvas">

      <bxml:script src="dragdrop.js" />

      <!-- <ImageView bxml:id="imageView" image="@plus.png" dragSource="$dragSoure"
            dropTarget="$dropTarget"/> -->
</canvas:CanvasController>

I don't know if the problem is maybe the container...or what...im a litlle new in pivot and
im a kind o lost...:s

Any help will be really apreciated!

Kind Regards,

[cid:image001.png@01CC5DBA.8A1405D0]

Camilo Casadiego Espitia
Arquitecto de SW
* + 57 1 6393000
* camilo.casadiego@adv.com.co<mailto:camilo.casadiego@adv.com.co>
* http://www.adv.com.co<http://www.adv.com.co/>
Carrera 11 No. 93 - 53 P7
Bogotá - Colombia




Mime
View raw message