forked from kiegroup/jbpm-designer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BZ 1083547 - Simulation engine: Label for time unit is incorrect [min…
…utes]
- Loading branch information
Tihomir Surdilovic
committed
Apr 8, 2014
1 parent
d4cc086
commit af995fa
Showing
4 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...-designer-api/src/main/java/org/jbpm/designer/notification/DesignerNotificationEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package org.jbpm.designer.notification; | ||
|
||
public class DesignerNotificationEvent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...rc/main/java/org/jbpm/designer/client/notification/DesignerNotificationPopupsManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jbpm.designer.client.notification; | ||
|
||
/** | ||
* Created with IntelliJ IDEA. | ||
* User: tihomirsurdilovic | ||
* Date: 4/8/14 | ||
* Time: 10:21 AM | ||
* To change this template use File | Settings | File Templates. | ||
*/ | ||
public class DesignerNotificationPopupsManager { | ||
} |
88 changes: 88 additions & 0 deletions
88
jbpm-designer-client/src/main/java/org/jbpm/designer/client/popups/ErrorPopup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
package org.jbpm.designer.client.popups; | ||
|
||
import com.github.gwtbootstrap.client.ui.Modal; | ||
import com.github.gwtbootstrap.client.ui.constants.BackdropType; | ||
import com.github.gwtbootstrap.client.ui.event.HiddenEvent; | ||
import com.github.gwtbootstrap.client.ui.event.HiddenHandler; | ||
import com.github.gwtbootstrap.client.ui.event.ShowEvent; | ||
import com.github.gwtbootstrap.client.ui.event.ShowHandler; | ||
import com.google.gwt.core.client.GWT; | ||
import com.google.gwt.safehtml.shared.SafeHtmlUtils; | ||
import com.google.gwt.uibinder.client.UiBinder; | ||
import com.google.gwt.uibinder.client.UiField; | ||
import com.google.gwt.user.client.Window; | ||
import com.google.gwt.user.client.ui.HTML; | ||
import com.google.gwt.user.client.ui.Widget; | ||
import org.uberfire.client.workbench.widgets.common.ModalFooterOKButton; | ||
import org.uberfire.mvp.Command; | ||
|
||
/** | ||
* A popup that shows an error message | ||
*/ | ||
public class ErrorPopup extends Modal { | ||
|
||
interface ErrorPopupWidgetBinder | ||
extends | ||
UiBinder<Widget, ErrorPopup> { | ||
|
||
} | ||
|
||
private static ErrorPopupWidgetBinder uiBinder = GWT.create( ErrorPopupWidgetBinder.class ); | ||
|
||
private static ErrorPopup instance = new ErrorPopup(); | ||
|
||
@UiField | ||
protected HTML message; | ||
|
||
private ErrorPopup() { | ||
setTitle( "Error" ); | ||
setMaxHeigth( ( Window.getClientHeight() * 0.75 ) + "px" ); | ||
setBackdrop( BackdropType.STATIC ); | ||
setKeyboard( true ); | ||
setAnimation( true ); | ||
setDynamicSafe( true ); | ||
setHideOthers( false ); | ||
|
||
add( uiBinder.createAndBindUi( this ) ); | ||
add( new ModalFooterOKButton( new Command() { | ||
@Override | ||
public void execute() { | ||
hide(); | ||
} | ||
} ) ); | ||
} | ||
|
||
public void setMessage( final String message ) { | ||
this.message.setHTML( SafeHtmlUtils.fromTrustedString( message ) ); | ||
} | ||
|
||
public static void showMessage( String message ) { | ||
instance.setMessage( message ); | ||
instance.show(); | ||
} | ||
|
||
public static void showMessage( final String msg, | ||
final Command afterShow, | ||
final Command afterClose ) { | ||
new ErrorPopup() {{ | ||
setMessage( msg ); | ||
addShowHandler( new ShowHandler() { | ||
@Override | ||
public void onShow( final ShowEvent showEvent ) { | ||
if ( afterShow != null ) { | ||
afterShow.execute(); | ||
} | ||
} | ||
} ); | ||
addHiddenHandler( new HiddenHandler() { | ||
@Override | ||
public void onHidden( final HiddenEvent hiddenEvent ) { | ||
if ( afterClose != null ) { | ||
afterClose.execute(); | ||
} | ||
} | ||
} ); | ||
}}.show(); | ||
} | ||
|
||
} |