Search in sources :

Example 1 with IFormManager

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

the class FormFrame method closeWindow.

public void closeWindow() {
    GraphicsDevice device = getGraphicsConfiguration().getDevice();
    if (device.getFullScreenWindow() == this) {
        // reset full-screen window when window closes
        device.setFullScreenWindow(null);
    }
    storeBounds();
    setVisible(false);
    IFormManager ifm = application.getFormManager();
    if (ifm instanceof FormManager) {
        ((FormManager) ifm).setCurrentContainer(null, null);
    }
}
Also used : GraphicsDevice(java.awt.GraphicsDevice) IFormManager(com.servoy.j2db.IFormManager) IFormManager(com.servoy.j2db.IFormManager) FormManager(com.servoy.j2db.FormManager)

Example 2 with IFormManager

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

the class CmdDeleteRecord method doIt.

@Override
public UndoableEdit doIt(java.util.EventObject ae) {
    try {
        // $NON-NLS-1$
        application.blockGUI(application.getI18NMessage("servoy.menuitem.deleteRecord.status.text"));
        IFormManager fm = application.getFormManager();
        IForm dm = fm.getCurrentForm();
        if (dm != null) {
            dm.deleteRecord();
        }
    } finally {
        application.releaseGUI();
    }
    return null;
}
Also used : IFormManager(com.servoy.j2db.IFormManager) IForm(com.servoy.j2db.IForm)

Example 3 with IFormManager

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

the class CmdDuplicateRecord method doIt.

/*
 * _____________________________________________________________ The methods below override methods from superclass AbstractCmd
 */
@Override
public UndoableEdit doIt(java.util.EventObject ae) {
    try {
        // $NON-NLS-1$
        application.blockGUI(application.getI18NMessage("servoy.menuitem.duplicateRecord.status.text"));
        IFormManager fm = application.getFormManager();
        IForm dm = fm.getCurrentForm();
        dm.duplicateRecord();
    } finally {
        application.releaseGUI();
    }
    return null;
}
Also used : IFormManager(com.servoy.j2db.IFormManager) IForm(com.servoy.j2db.IForm)

Example 4 with IFormManager

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

the class CmdExtendFind method doIt.

/*
 * _____________________________________________________________ The methods below override methods from superclass AbstractCmd
 */
@Override
public UndoableEdit doIt(java.util.EventObject ae) {
    IFormManager fm = application.getFormManager();
    IForm cf = fm.getCurrentForm();
    if (cf != null && !cf.isInFindMode()) {
        cf = null;
    }
    if (cf == null) {
        IForm[] rfif = ((FormManager) fm).getVisibleRootFormsInFind();
        cf = rfif.length > 0 ? rfif[0] : null;
    // rfif.length > 1 would be a strange case where more than one visible form relation hierarchy is in find mode;
    // we choose the first one - I or should we use all of them?! this is an ansupported case anyway
    }
    if (cf != null) {
        cf.performFind(false, false, true);
    }
    return null;
}
Also used : IFormManager(com.servoy.j2db.IFormManager) IFormManager(com.servoy.j2db.IFormManager) FormManager(com.servoy.j2db.FormManager) IForm(com.servoy.j2db.IForm)

Example 5 with IFormManager

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

the class CmdPrevRecord method doIt.

@Override
public UndoableEdit doIt(java.util.EventObject ae) {
    IFormManager fm = application.getFormManager();
    final FormController fp = (FormController) fm.getCurrentForm();
    fp.selectPrevRecord();
    return null;
}
Also used : FormController(com.servoy.j2db.FormController) IFormManager(com.servoy.j2db.IFormManager)

Aggregations

IFormManager (com.servoy.j2db.IFormManager)17 IForm (com.servoy.j2db.IForm)14 FormManager (com.servoy.j2db.FormManager)3 FormController (com.servoy.j2db.FormController)2 GraphicsDevice (java.awt.GraphicsDevice)1