Search in sources :

Example 16 with Portal

use of com.servoy.j2db.persistence.Portal in project servoy-client by Servoy.

the class TableView method onDrag.

public int onDrag(JSDNDEvent event) {
    int onDragID = 0;
    if (cellview instanceof Portal) {
        Portal cellviewPortal = (Portal) cellview;
        onDragID = cellviewPortal.getOnDragMethodID();
    } else {
        onDragID = fc.getForm().getOnDragMethodID();
    }
    if (onDragID > 0) {
        // $NON-NLS-1$
        Object dragReturn = fc.executeFunction(Integer.toString(onDragID), new Object[] { event }, false, null, false, "onDragMethodID");
        if (dragReturn instanceof Number)
            return ((Number) dragReturn).intValue();
    }
    return DRAGNDROP.NONE;
}
Also used : Portal(com.servoy.j2db.persistence.Portal) EventObject(java.util.EventObject) Point(java.awt.Point)

Example 17 with Portal

use of com.servoy.j2db.persistence.Portal in project servoy-client by Servoy.

the class TableView method getOnDropMethodID.

private int getOnDropMethodID() {
    int onDropID = 0;
    if (cellview instanceof Portal) {
        Portal cellviewPortal = (Portal) cellview;
        onDropID = cellviewPortal.getOnDropMethodID();
    } else {
        onDropID = fc.getForm().getOnDropMethodID();
    }
    return onDropID;
}
Also used : Portal(com.servoy.j2db.persistence.Portal) Point(java.awt.Point)

Example 18 with Portal

use of com.servoy.j2db.persistence.Portal in project servoy-client by Servoy.

the class TableView method onDragEnd.

public void onDragEnd(JSDNDEvent event) {
    int onDragEndID = 0;
    if (cellview instanceof Portal) {
        Portal cellviewPortal = (Portal) cellview;
        onDragEndID = cellviewPortal.getOnDragEndMethodID();
    } else {
        onDragEndID = fc.getForm().getOnDragEndMethodID();
    }
    if (onDragEndID > 0) {
        // $NON-NLS-1$
        fc.executeFunction(Integer.toString(onDragEndID), new Object[] { event }, false, null, false, "onDragEndMethodID");
    }
}
Also used : Portal(com.servoy.j2db.persistence.Portal) Point(java.awt.Point)

Example 19 with Portal

use of com.servoy.j2db.persistence.Portal in project servoy-client by Servoy.

the class ScrollResponseHeaderContainer method initDragNDrop.

public void initDragNDrop(FormController formController, int clientDesignYOffset) {
    this.yOffset = clientDesignYOffset;
    boolean enableDragDrop = false;
    if (cellview instanceof Portal) {
        Portal cellviewPortal = (Portal) cellview;
        enableDragDrop = (cellviewPortal.getOnDragMethodID() > 0 || cellviewPortal.getOnDragEndMethodID() > 0 || cellviewPortal.getOnDragOverMethodID() > 0 || cellviewPortal.getOnDropMethodID() > 0);
    } else {
        Form form = formController.getForm();
        enableDragDrop = (form.getOnDragMethodID() > 0 || form.getOnDragEndMethodID() > 0 || form.getOnDragOverMethodID() > 0 || form.getOnDropMethodID() > 0);
    }
    if (enableDragDrop) {
        dragNdropController = formController;
        addDragNDropBehavior();
    }
}
Also used : IForm(com.servoy.j2db.IForm) Form(com.servoy.j2db.persistence.Form) WebForm(com.servoy.j2db.server.headlessclient.WebForm) Portal(com.servoy.j2db.persistence.Portal) RuntimePortal(com.servoy.j2db.ui.scripting.RuntimePortal)

Example 20 with Portal

use of com.servoy.j2db.persistence.Portal in project servoy-client by Servoy.

the class ScrollResponseHeaderContainer method getOtherFormPartsHeight.

private int getOtherFormPartsHeight() {
    int bodyDesignHeight = endY - startY;
    int otherPartsHeight = (cellview instanceof Portal) ? 0 : formDesignHeight - bodyDesignHeight;
    return otherPartsHeight;
}
Also used : Portal(com.servoy.j2db.persistence.Portal) RuntimePortal(com.servoy.j2db.ui.scripting.RuntimePortal) Point(java.awt.Point)

Aggregations

Portal (com.servoy.j2db.persistence.Portal)25 Point (java.awt.Point)13 RuntimePortal (com.servoy.j2db.ui.scripting.RuntimePortal)10 Form (com.servoy.j2db.persistence.Form)6 IPersist (com.servoy.j2db.persistence.IPersist)6 GraphicalComponent (com.servoy.j2db.persistence.GraphicalComponent)5 Field (com.servoy.j2db.persistence.Field)4 IFormElement (com.servoy.j2db.persistence.IFormElement)4 IForm (com.servoy.j2db.IForm)3 IServoyAwareBean (com.servoy.j2db.dataui.IServoyAwareBean)3 AbstractBase (com.servoy.j2db.persistence.AbstractBase)3 BaseComponent (com.servoy.j2db.persistence.BaseComponent)3 Bean (com.servoy.j2db.persistence.Bean)3 Part (com.servoy.j2db.persistence.Part)3 RepositoryException (com.servoy.j2db.persistence.RepositoryException)3 WebForm (com.servoy.j2db.server.headlessclient.WebForm)3 IComponent (com.servoy.j2db.ui.IComponent)3 ISupportAnchors (com.servoy.j2db.persistence.ISupportAnchors)2 ISupportName (com.servoy.j2db.persistence.ISupportName)2 TabPanel (com.servoy.j2db.persistence.TabPanel)2