Search in sources :

Example 1 with MEditAction

use of net.jumperz.app.MMonjaDBCore.action.mj.MEditAction in project MonjaDB by Kanatoko.

the class MDocumentList method update.

//--------------------------------------------------------------------------------
public void update(final Object e, final Object source) {
    //threadPool.addCommand( new MCommand() {	public void execute(){ //-----------------
    final MEvent event = (MEvent) e;
    final String eventName = event.getEventName();
    if (event.getEventName().indexOf(event_find + "_end") == 0) {
        MFindAction action = (MFindAction) source;
        onFind(action);
    } else if (event.getEventName().indexOf(event_mj_sort + "_end") == 0) {
        onSort();
    } else if (event.getEventName().indexOf(event_mj_edit + "_end") == 0) {
        MEditAction action = (MEditAction) source;
        onEdit(action);
    } else if (event.getEventName().indexOf(event_use + "_end") == 0) {
        onUse();
    } else if (event.getEventName().indexOf(event_mj_copy + "_end") == 0) {
        onCopy();
    } else if (event.getEventName().indexOf(event_mj_paste + "_end") == 0) {
        onPaste();
    } else if (event.getEventName().indexOf(event_mj_remove + "_end") == 0) {
        onRemove();
    } else if (event.getEventName().indexOf(event_disconnect + "_end") == 0) {
        onDisconnect();
    }
//	} public void breakCommand(){}	} ); //------------
}
Also used : MEditAction(net.jumperz.app.MMonjaDBCore.action.mj.MEditAction)

Example 2 with MEditAction

use of net.jumperz.app.MMonjaDBCore.action.mj.MEditAction in project MonjaDB by Kanatoko.

the class MDataManager method update.

//--------------------------------------------------------------------------------
public void update(final Object e, final Object source) {
    //threadPool.addCommand( new MCommand() {	public void execute(){ //-----------------
    MEvent event = (MEvent) e;
    if (event.getEventName().indexOf(event_connect + "_end") == 0) {
        onConnect((MConnectAction) source);
    } else if (event.getEventName().indexOf(event_showdbs + "_end") == 0) {
        MShowDBAction action = (MShowDBAction) source;
        onShowDbs(action);
    } else if (event.getEventName().indexOf(event_use + "_end") == 0) {
        MUseAction action = (MUseAction) source;
        onUse(action);
    } else if (event.getEventName().indexOf(event_find + "_end") == 0) {
        MFindAction action = (MFindAction) source;
        try {
            onFind(action);
        } catch (IOException ex) {
            MEventManager.getInstance().fireErrorEvent(ex);
        }
    } else if (event.getEventName().indexOf(event_mj_edit + "_end") == 0) {
        MEditAction action = (MEditAction) source;
        onEdit(action);
    } else if (event.getEventName().indexOf(event_mj_prev_items + "_end") == 0) {
        onPrevItems();
    } else if (event.getEventName().indexOf(event_mj_next_items + "_end") == 0) {
        onNextItems();
    } else if (event.getEventName().indexOf(event_disconnect + "_end") == 0) {
        onDisconnect();
    }
/*
else if( event.getEventName().indexOf( event_find + "_end" ) == 0 )
	{
	MFindAction action = ( MFindAction )source;
	onFind( action );
	}
*/
//} public void breakCommand(){}	} ); //------------
}
Also used : IOException(java.io.IOException) MEditAction(net.jumperz.app.MMonjaDBCore.action.mj.MEditAction)

Aggregations

MEditAction (net.jumperz.app.MMonjaDBCore.action.mj.MEditAction)2 IOException (java.io.IOException)1