Class FileUploadPopupView
- java.lang.Object
-
- org.drools.workbench.screens.scenariosimulation.client.popup.AbstractScenarioPopupView
-
- org.drools.workbench.screens.scenariosimulation.client.popup.FileUploadPopupView
-
- All Implemented Interfaces:
AbstractScenarioPopup,FileUploadPopup
@Templated public class FileUploadPopupView extends AbstractScenarioPopupView implements FileUploadPopup
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.workbench.screens.scenariosimulation.client.popup.AbstractScenarioPopup
AbstractScenarioPopup.Presenter
-
Nested classes/interfaces inherited from interface org.drools.workbench.screens.scenariosimulation.client.popup.FileUploadPopup
FileUploadPopup.Presenter
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>acceptedExtensionprotected com.google.gwt.dom.client.SpanElementchooseButtonprotected com.google.gwt.dom.client.InputElementfileprotected static StringfileContentsprotected static StringfileNameprotected com.google.gwt.dom.client.InputElementfileTextprotected com.google.gwt.dom.client.ParagraphElementuploadWarning-
Fields inherited from class org.drools.workbench.screens.scenariosimulation.client.popup.AbstractScenarioPopupView
cancelButton, mainTitle, modal, okButton, okCommand, translationService
-
-
Constructor Summary
Constructors Constructor Description FileUploadPopupView()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidfileLoaded(String fileContents)StringgetFileContents()StringgetFileName()voidinit()voidonChooseButtonClickEvent(com.google.gwt.event.dom.client.ClickEvent clickEvent)voidonFileChangeEvent(com.google.gwt.event.dom.client.ChangeEvent event)static voidreadTextFile(com.google.gwt.core.client.JavaScriptObject files)voidsetAcceptedExtension(List<String> acceptedExtension)voidshow(String mainTitleText, String uploadWarningText, String okButtonText, org.uberfire.mvp.Command okCommand)voidshow(String mainTitleText, String okButtonText, org.uberfire.mvp.Command okCommand)Makes theScenarioPopupvisible with OK/Cancel buttons.-
Methods inherited from class org.drools.workbench.screens.scenariosimulation.client.popup.AbstractScenarioPopupView
conditionalShow, conditionalShow, getElement, hide, onCancelClick, onOkClick
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.workbench.screens.scenariosimulation.client.popup.FileUploadPopup
getElement, hide
-
-
-
-
Field Detail
-
file
@DataField("file") protected com.google.gwt.dom.client.InputElement file
-
fileText
@DataField("fileText") protected com.google.gwt.dom.client.InputElement fileText
-
chooseButton
@DataField("chooseButton") protected com.google.gwt.dom.client.SpanElement chooseButton
-
uploadWarning
@DataField("upload-warning") protected com.google.gwt.dom.client.ParagraphElement uploadWarning
-
fileContents
protected static String fileContents
-
fileName
protected static String fileName
-
-
Method Detail
-
fileLoaded
public static void fileLoaded(String fileContents)
-
init
public void init()
- Overrides:
initin classAbstractScenarioPopupView
-
show
public void show(String mainTitleText, String okButtonText, org.uberfire.mvp.Command okCommand)
Description copied from interface:AbstractScenarioPopupMakes theScenarioPopupvisible with OK/Cancel buttons.- Specified by:
showin interfaceAbstractScenarioPopup- Overrides:
showin classAbstractScenarioPopupView
-
show
public void show(String mainTitleText, String uploadWarningText, String okButtonText, org.uberfire.mvp.Command okCommand)
- Specified by:
showin interfaceFileUploadPopup
-
getFileContents
public String getFileContents()
- Specified by:
getFileContentsin interfaceFileUploadPopup
-
getFileName
public String getFileName()
- Specified by:
getFileNamein interfaceFileUploadPopup
-
setAcceptedExtension
public void setAcceptedExtension(List<String> acceptedExtension)
- Specified by:
setAcceptedExtensionin interfaceFileUploadPopup
-
onChooseButtonClickEvent
@EventHandler("chooseButton") public void onChooseButtonClickEvent(com.google.gwt.event.dom.client.ClickEvent clickEvent)
-
onFileChangeEvent
@EventHandler("file") public void onFileChangeEvent(com.google.gwt.event.dom.client.ChangeEvent event)
-
readTextFile
public static void readTextFile(com.google.gwt.core.client.JavaScriptObject files)
-
-