pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camilo Casadiego <Camilo.Casadi...@adv.co>
Subject RE: Process meter presentation problem
Date Thu, 06 Sep 2012 22:10:42 GMT
I think the info regarding the threads isn't necesary because it works as expected any wai
I have a base class tha implements the TaskListener<String> and another one that extends
Task<String> and the threads run as I want to...

The BaseFrameController.bxml is managed by the class BaseFrameController which definitio si
this one:

public class BaseFrameController extends Frame implements GenericViewController

and

public abstract interface GenericViewController extends Bindable{

So al least I have:

<?xml version="1.0" encoding="UTF-8"?>
<menus:BaseFrameController title="ADV. Salarix Modulo de Operaciones" maximized="true"
    styles="{padding:{top:0, left:4, bottom:4, right:4}, showWindowControls:false}"
    xmlns:bxml="http://pivot.apache.org/bxml"
    xmlns:content="org.apache.pivot.wtk.content"
    xmlns:menus="co.com.adv.salarix.operations.module.controller.base"
    xmlns="org.apache.pivot.wtk">
    <bxml:define>
        <FileBrowserSheet bxml:id="fileBrowserSheet"/>
    </bxml:define>

    <!-- <actionMappings>
        <Window.ActionMapping action="new" keyStroke="CMD-N"/>
    </actionMappings>
  -->
    <menuBar>
        <MenuBar>
            <MenuBar.Item buttonData="Main">
                <Menu>
                    <Menu.Section>
                        <Menu.Item action="choseCompany">
                            <buttonData>
                                <content:MenuItemData text="Seleccionar empresa" keyboardShortcut="CMD-N"/>
                            </buttonData>
                        </Menu.Item>
                                 </Menu.Section>
                </Menu>
            </MenuBar.Item>
           <MenuBar.Item buttonData="Configuracion">
                <Menu>
                    <Menu.Section>
                        <Menu.Item action="config">
                            <buttonData>
                                <content:MenuItemData text="Configurar opciones"/>
                            </buttonData>
                        </Menu.Item>
                    </Menu.Section>
                </Menu>
            </MenuBar.Item>

            <MenuBar.Item buttonData="Herramientas">
                <Menu>
                    <Menu.Section>
                        <Menu.Item action="genDataBase">
                            <buttonData>
                                <content:MenuItemData text="Exportar base de datos local"/>
                            </buttonData>
                        </Menu.Item>
                    </Menu.Section>
                </Menu>
            </MenuBar.Item>

            <MenuBar.Item buttonData="Ayuda">
                <Menu>
                    <Menu.Section>
                        <Menu.Item action="help">
                            <buttonData>
                                <content:MenuItemData text="Ver ayuda"/>
                            </buttonData>
                        </Menu.Item>
                    </Menu.Section>

                    <Menu.Section>
                        <Menu.Item action="about">
                            <buttonData>
                                <content:MenuItemData text="Acerca de"/>
                            </buttonData>
                        </Menu.Item>
                    </Menu.Section>
                </Menu>
            </MenuBar.Item>
        </MenuBar>
    </menuBar>
<Border bxml:id="borderB" styles="{backgroundColor:null, padding:2}">
       <ActivityIndicator bxml:id="activityIndicator"/>
    </Border>
    <Border bxml:id="borderA" styles="{backgroundColor:null, padding:2}">
       <TabPane bxml:id="contents"/>
    </Border>
</menus:BaseFrameController>

On one of my las attemps i changed the las lines to this

<Border styles="{backgroundColor:null, padding:2}">
           <BoxPane orientation="horizontal"  styles="{fill:true}">
                           <ActivityIndicator bxml:id="activityIndicator"/>
                     <TabPane bxml:id="contents"/>
           </BoxPane>
    </Border>
Bu the this is te secuence I got (the seleccition on the first box launches the background
process) ;(

[cid:image003.jpg@01CD8C52.8BBFEB70][cid:image004.jpg@01CD8C52.8BBFEB70][cid:image005.jpg@01CD8C52.8BBFEB70]

As you can see here It shows first the process monitor the the part it hsould show...but all
the marings...and presentation itself is mess up :s

I just want that it only shows the process monitor and then show the workspace

De: Roger L. Whitcomb [mailto:Roger.Whitcomb@actian.com]
Enviado el: Thursday, September 06, 2012 4:37 PM
Para: user@pivot.apache.org
Asunto: RE: Process meter presentation problem

Which thread are these methods running in?  And what is the parent container of these two
<Border...> components?  Maybe you could supply a little more context from your main
bxml file ....

~Roger Whitcomb

From: Camilo Casadiego [mailto:Camilo.Casadiego@adv.co]
Sent: Thursday, September 06, 2012 1:58 PM
To: user@pivot.apache.org<mailto:user@pivot.apache.org>
Subject: Process meter presentation problem

Hi there, I used the process indicator example showed in the example in http://pivot.apache.org/tutorials/background-tasks.html
and everything is working as expected...but at the end I want to show the process logo and
when the task finishes I want to show the normal working page...What I want to achieve is
something like this..

when the process is running should look like this..
[cid:image001.jpg@01CD8C51.AE078360]
and when the process is finished i want it to show the actual real window
[cid:image002.jpg@01CD8C51.AE078360]

To try to achieve this I have placed components like this

<Border bxml:id="borderB" styles="{backgroundColor:null, padding:2}">
       <ActivityIndicator bxml:id="activityIndicator"/>
    </Border>
    <Border bxml:id="borderA" styles="{backgroundColor:null, padding:2}">
       <TabPane bxml:id="contents"/>
    </Border>

Where this componets are contained into a big Frame class

ublic class BaseFrameController extends Frame implements GenericViewController

In order to show one or another this is what im trying to do

public void activateWaitAction(){
              baseFrame.getBorderA().setVisible(true);
              baseFrame.getContents().setEnabled(false);
              baseFrame.setEnabled(false);
              baseFrame.getActivityIndicator().setActive(true);
       }

       public void releaseWaitAction(){
              baseFrame.getBorderA().setVisible(false);
              baseFrame.getBorderA().setEnabled(false);
              baseFrame.getContents().setEnabled(true);
              baseFrame.setEnabled(true);
              baseFrame.getActivityIndicator().setActive(false);
       }

when the process startarts I call the first method and when finished I call the second one...but
nothing happens...I can show one or another window acording on the order I place the in the
bxml file...I know this should be a simple rendering problem bur rigth now Im really stuck..Any
help'll be really apreciated (The code regarding the task and task monitors works perfect
;) )

Mime
View raw message