Search in sources :

Example 6 with IForm

use of com.servoy.j2db.IForm 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 7 with IForm

use of com.servoy.j2db.IForm 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 8 with IForm

use of com.servoy.j2db.IForm 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 9 with IForm

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

the class CmdPreviewMode method doIt.

/*
 * _____________________________________________________________ The methods below override methods from superclass AbstractCmd
 */
@Override
public UndoableEdit doIt(java.util.EventObject ae) {
    IFormManager fm = application.getFormManager();
    // showPreview(fm.getCurrentMainShowingForm());
    IForm form = fm.getCurrentForm();
    if (form != null)
        form.printPreview();
    return null;
}
Also used : IFormManager(com.servoy.j2db.IFormManager) IForm(com.servoy.j2db.IForm)

Example 10 with IForm

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

the class CmdReCopyValues method doIt.

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

Aggregations

IForm (com.servoy.j2db.IForm)24 IFormManager (com.servoy.j2db.IFormManager)14 FormController (com.servoy.j2db.FormController)7 FormManager (com.servoy.j2db.FormManager)7 RepositoryException (com.servoy.j2db.persistence.RepositoryException)4 FlattenedSolution (com.servoy.j2db.FlattenedSolution)2 IScriptExecuter (com.servoy.j2db.IScriptExecuter)2 AbstractBase (com.servoy.j2db.persistence.AbstractBase)2 Form (com.servoy.j2db.persistence.Form)2 IDataProvider (com.servoy.j2db.persistence.IDataProvider)2 SwingFormManager (com.servoy.j2db.smart.SwingFormManager)2 IDisplayTagText (com.servoy.j2db.ui.IDisplayTagText)2 IStylePropertyChangesRecorder (com.servoy.j2db.ui.IStylePropertyChangesRecorder)2 RenderEventExecutor (com.servoy.j2db.ui.RenderEventExecutor)2 Pair (com.servoy.j2db.util.Pair)2 IOException (java.io.IOException)2 Map (java.util.Map)2 AbstractActiveSolutionHandler (com.servoy.j2db.AbstractActiveSolutionHandler)1 ApplicationException (com.servoy.j2db.ApplicationException)1 BasicFormController (com.servoy.j2db.BasicFormController)1