本文整理汇总了Java中org.pentaho.ui.xul.containers.XulDialog类的典型用法代码示例。如果您正苦于以下问题:Java XulDialog类的具体用法?Java XulDialog怎么用?Java XulDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XulDialog类属于org.pentaho.ui.xul.containers包,在下文中一共展示了XulDialog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeXul
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
private void initializeXul() throws XulException {
SwtXulLoader loader = new SwtXulLoader();
loader.registerClassLoader(getClass().getClassLoader());
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
loader.setOuterContext(parentShell);
container = loader.loadXul( xulFile, new XulSpoonResourceBundle(getClassForMessages()));
bf.setDocument(container.getDocumentRoot());
for(XulEventHandler h : getEventHandlers()){
container.addEventHandler(h);
}
runner = new SwtXulRunner();
runner.addContainer(container);
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
dialogShell = (Shell) xulDialog.getRootObject();
runner.initialize();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:BaseStepXulDialog.java
示例2: open
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void open() {
try {
SwtXulLoader theLoader = new SwtXulLoader();
theLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
theLoader.setOuterContext(this.shell);
this.container = theLoader.loadXul(XUL);
this.controller = new XulPreviewRowsController(this.shell, this.databaseMeta, this.schema, this.table, this.limit);
this.container.addEventHandler(this.controller);
this.runner = new SwtXulRunner();
this.runner.addContainer(this.container);
this.runner.initialize();
XulDialog thePreviewDialog = (XulDialog) this.container.getDocumentRoot().getElementById("previewRowsDialog");
thePreviewDialog.show();
} catch (Exception e) {
logger.info(e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:22,代码来源:XulPreviewRowsDialog.java
示例3: open
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void open(boolean isAcceptButtonHidden) {
try {
SwtXulLoader theLoader = new SwtXulLoader();
theLoader.setOuterContext(this.shell);
theLoader.setSettingsManager(XulSpoonSettingsManager.getInstance());
this.container = theLoader.loadXul(XUL);
this.controller = new XulStepFieldsController(this.shell, this.databaseMeta, this.schemaTableCombo, this.rowMeta);
this.controller.setShowAcceptButton(isAcceptButtonHidden);
this.container.addEventHandler(this.controller);
this.runner = new SwtXulRunner();
this.runner.addContainer(this.container);
this.runner.initialize();
XulDialog thePreviewDialog = (XulDialog) this.container.getDocumentRoot().getElementById("stepFieldsDialog");
thePreviewDialog.show();
((SwtDialog)thePreviewDialog).dispose();
} catch (Exception e) {
logger.info(e);
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:23,代码来源:XulStepFieldsDialog.java
示例4: preview
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void preview() {
try {
AbstractReportDefinition element = processWizardSpecification();
SwtXulLoader theXulLoader = new SwtXulLoader();
theXulLoader.registerClassLoader(getClass().getClassLoader());
theXulLoader.setOuterContext(((XulRoot) document.getRootElement()).getRootObject());
theXulLoader.register("PRPT", "org.pentaho.agilebi.spoon.visualizations.xul.PrptViewerTag");
theXulContainer = theXulLoader.loadXul("org/pentaho/agilebi/spoon/wizard/prptPreview.xul");
theXulContainer.addEventHandler(new PreviewCloseHandler());
SwtXulRunner theRunner = new SwtXulRunner();
theRunner.addContainer(theXulContainer);
theRunner.initialize();
PrptViewerTag thePrptViewerTag = (PrptViewerTag) theXulContainer.getDocumentRoot().getElementById("prptViewer");
thePrptViewerTag.setMasterReport((MasterReport) element);
XulDialog theDialog = (XulDialog) theXulContainer.getDocumentRoot().getElementById("prpt-preview");
theDialog.show();
} catch (Exception e) {
e.printStackTrace();
logger.error("error previewing", e);
}
}
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:26,代码来源:PreviewWizardController.java
示例5: finish
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void finish() {
try {
MasterReport element = (MasterReport) processWizardSpecification();
element = WizardProcessorUtil.materialize(element, new WizardProcessor());
VisualizationManager theManager = VisualizationManager.getInstance();
PRPTVisualization theVisualization = (PRPTVisualization) theManager.getVisualization("Report Wizard");
if (theVisualization != null) {
theVisualization.createVisualizationFromMasterReport(element, tempModel);
}
((XulDialog) document.getElementById("main_wizard_window")).hide();
} catch (Exception e) {
e.printStackTrace();
logger.error("error finishing", e);
}
}
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:17,代码来源:PreviewWizardController.java
示例6: initializeXul
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException {
bf = bindingFactory;
this.runner = runner;
loader.registerClassLoader( getClass().getClassLoader() );
loader.setSettingsManager( getSettingsManager() );
loader.setOuterContext( parent );
container = loader.loadXul( xulFile, getResourceBundle() );
bf.setDocument( container.getDocumentRoot() );
for ( XulEventHandler h : getEventHandlers() ) {
container.addEventHandler( h );
}
this.runner.addContainer( container );
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
runner.initialize();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:AbstractPreviewRowsXulDialog.java
示例7: initializeXul
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
protected void initializeXul( XulLoader loader, BindingFactory bindingFactory, XulRunner runner, Object parent ) throws XulException {
bf = bindingFactory;
this.runner = runner;
loader.registerClassLoader( getClass().getClassLoader() );
loader.setSettingsManager( getSettingsManager() );
loader.setOuterContext( parent );
container = loader.loadXul( xulFile, getResourceBundle() );
bf.setDocument( container.getDocumentRoot() );
for ( XulEventHandler h : getEventHandlers() ) {
container.addEventHandler( h );
}
this.runner.addContainer( container );
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement();
runner.initialize();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:BaseStepGenericXulDialog.java
示例8: open
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void open() {
try {
KettleXulLoader theLoader = new KettleXulLoader();
theLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
theLoader.setOuterContext( this.shell );
this.container = theLoader.loadXul( XUL );
this.controller =
new XulPreviewRowsController( this.shell, this.databaseMeta, this.schema, this.table, this.limit );
this.container.addEventHandler( this.controller );
this.runner = new SwtXulRunner();
this.runner.addContainer( this.container );
this.runner.initialize();
XulDialog thePreviewDialog =
(XulDialog) this.container.getDocumentRoot().getElementById( "previewRowsDialog" );
thePreviewDialog.show();
} catch ( Exception e ) {
logger.info( e );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:24,代码来源:XulPreviewRowsDialog.java
示例9: open
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void open( boolean isAcceptButtonHidden ) {
try {
KettleXulLoader theLoader = new KettleXulLoader();
theLoader.setOuterContext( this.shell );
theLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
this.container = theLoader.loadXul( XUL );
this.controller =
new XulStepFieldsController( this.shell, this.databaseMeta, this.schemaTableCombo, this.rowMeta );
this.controller.setShowAcceptButton( isAcceptButtonHidden );
this.container.addEventHandler( this.controller );
this.runner = new SwtXulRunner();
this.runner.addContainer( this.container );
this.runner.initialize();
XulDialog thePreviewDialog =
(XulDialog) this.container.getDocumentRoot().getElementById( "stepFieldsDialog" );
thePreviewDialog.show();
( (SwtDialog) thePreviewDialog ).dispose();
} catch ( Exception e ) {
logger.info( e );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:25,代码来源:XulStepFieldsDialog.java
示例10: testStartExecuteDdl
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
@Test
public void testStartExecuteDdl() {
final XulDialog diag = context.mock(XulDialog.class);
context.checking(new Expectations() {
{
// get progress dialog
one(doc).getElementById(with(any(String.class)));
will(returnValue(diag));
one(executor).execute(with(any(new String[0].getClass())), with(any(ExecutorCallback.class)));
one(diag).show();
}
});
controller.startExecuteDdl();
// WG: The reason this test case was failing has to do with the Thread in startExecuteDdl.
// This test passes if given enough time to call execute() within the thread. as a temporary
// solution, I added a one second sleep at the end of this test to give the thread time to run.
// see this article for ideas on how to resolve this:
// http://www.jmock.org/threads.html
try {
Thread.sleep(1000);
} catch (Exception e) {
}
}
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:27,代码来源:ExportHandlerTest.java
示例11: testLoadDatabaseDialog
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
@Test
public void testLoadDatabaseDialog() {
final XulDialog dialog = context.mock(XulDialog.class);
context.checking(new Expectations() {
{
one(doc).getElementById(ConnectionController.GENERAL_DATASOURCE_WINDOW);
will(returnValue(dialog));
one(dialog).show();
allowing(dataHandler).setData(with(any(DatabaseMeta.class)));
allowing(dataHandler).getData();
will(returnValue(new DatabaseMeta()));
allowing(model).getDatabaseMeta();
will(returnValue(new DatabaseMeta()));
one(model).setDatabaseMeta(with(any(DatabaseMeta.class)));
}
});
controller.loadDatabaseDialog();
}
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:19,代码来源:ConnectionControllerTest.java
示例12: testApply_Success
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
@Test
public void testApply_Success() throws XulException, AggDesignerException {
setupSchemaProviderDefaults();
context.checking(new Expectations() {
{
//using dialog stub here instead of a mock so we get thread blocking which is needed to have this test run sucessfully
final XulDialog waitDialog = new XulDialogStub();
allowing(doc).getElementById(ConnectionController.ANON_WAIT_DIALOG);
will(returnValue(waitDialog));
one(model).setCubeNames(cubeNames);
one(model).setSelectedSchemaModel(providerModel);
}
});
controller.apply();
}
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:19,代码来源:ConnectionControllerTest.java
示例13: editOriginStep
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void editOriginStep() {
StepFieldNode theSelectedStep = (StepFieldNode) this.stepFieldsTree.getSelectedItem();
if (theSelectedStep != null) {
XulDialog theStepsDialog = (XulDialog) document.getElementById("stepFieldsDialog");
theStepsDialog.hide();
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:8,代码来源:XulStepFieldsController.java
示例14: close
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
private void close(){
XulComponent window = document.getElementById("general-datasource-window"); //$NON-NLS-1$
if(window == null){ //window must be root
window = document.getRootElement();
}
if(window instanceof XulDialog){
((XulDialog) window).hide();
} else if(window instanceof XulWindow){
((XulWindow) window).close();
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:13,代码来源:DataHandler.java
示例15: initDialogController
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
/**
* Initializes a dialog using the specified xul document and dialog id. If
* an event handler is not provided the dialog class will be added as an
* event handler
* @param xulPath Path to the XUL document
* @param dialogId Id of the dialog to create
* @param eventHandler Optional event handler to register
* @param perspective Optional perspective to load
* @throws XulException
*/
public void initDialogController( String xulPath, String dialogId, XulEventHandler eventHandler, String perspective ) throws XulException {
SwtXulLoader loader = new SwtXulLoader();
loader.registerClassLoader(getClass().getClassLoader());
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
loader.setOuterContext(shell);
container = loader.loadXul( xulPath );
if( eventHandler != null ) {
container.addEventHandler(eventHandler);
} else {
container.addEventHandler(this);
}
runner = new SwtXulRunner();
runner.addContainer(container);
// try and get the dialog
xulDialog = (XulDialog) container.getDocumentRoot().getRootElement().getElementById( dialogId );
swtDialog = (Composite) container.getDocumentRoot().getRootElement().getElementById( dialogId ).getManagedObject();
runner.initialize();
if( perspective != null ) {
container.loadPerspective( perspective );
}
}
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:37,代码来源:AbstractSwtXulDialogController.java
示例16: editOriginStep
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void editOriginStep() {
StepFieldNode theSelectedStep = (StepFieldNode) this.stepFieldsTree.getSelectedItem();
if ( theSelectedStep != null ) {
XulDialog theStepsDialog = (XulDialog) document.getElementById( "stepFieldsDialog" );
theStepsDialog.hide();
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:8,代码来源:XulStepFieldsController.java
示例17: open
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public boolean open() {
try {
KettleXulLoader theLoader = new KettleXulLoader();
theLoader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
theLoader.setSettingsManager( new DefaultSettingsManager( new File( Const.getKettleDirectory()
+ Const.FILE_SEPARATOR + "xulSettings.properties" ) ) );
theLoader.setOuterContext( this.shell );
this.container = theLoader.loadXul( XUL, new XulDatabaseExplorerResourceBundle() );
XulDialog theExplorerDialog =
(XulDialog) this.container.getDocumentRoot().getElementById( "databaseExplorerDialog" );
SpoonPluginManager.getInstance().applyPluginsForContainer( "database_dialog", container );
this.controller =
new XulDatabaseExplorerController(
(Shell) theExplorerDialog.getRootObject(), this.databaseMeta, this.databases, look );
this.container.addEventHandler( this.controller );
this.runner = new SwtXulRunner();
this.runner.addContainer( this.container );
this.runner.initialize();
this.controller.setSelectedSchemaAndTable( schemaName, selectedTable );
// show dialog if connection is success only.
if ( controller.getActionStatus() == UiPostActionStatus.OK ) {
theExplorerDialog.show();
}
} catch ( Exception e ) {
LogChannel.GENERAL.logError( "Error exploring database", e );
}
return this.controller.getSelectedTable() != null;
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:40,代码来源:XulDatabaseExplorerDialog.java
示例18: close
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
private void close() {
XulComponent window = document.getElementById( "general-datasource-window" );
if ( window == null ) { // window must be root
window = document.getRootElement();
}
if ( window instanceof XulDialog ) {
( (XulDialog) window ).hide();
} else if ( window instanceof XulWindow ) {
( (XulWindow) window ).close();
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:13,代码来源:DataHandler.java
示例19: createBindings
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
private void createBindings() {
repositoryConfigDialog = (XulDialog) document.getElementById( "repository-config-dialog" );//$NON-NLS-1$
url = (XulTextbox) document.getElementById( "repository-url" );//$NON-NLS-1$
name = (XulTextbox) document.getElementById( "repository-name" );//$NON-NLS-1$
id = (XulTextbox) document.getElementById( "repository-id" );//$NON-NLS-1$
modificationComments = (XulCheckbox) document.getElementById( "repository-modification-comments" );//$NON-NLS-1$
okButton = (XulButton) document.getElementById( "repository-config-dialog_accept" ); //$NON-NLS-1$
bf.setBindingType( Type.BI_DIRECTIONAL );
bf.createBinding( model, "url", url, "value" );//$NON-NLS-1$ //$NON-NLS-2$
bf.createBinding( model, "name", name, "value" );//$NON-NLS-1$ //$NON-NLS-2$
bf.createBinding( model, "id", id, "value" );//$NON-NLS-1$ //$NON-NLS-2$
bf.createBinding( model, "modificationComments", modificationComments, "checked" );//$NON-NLS-1$ //$NON-NLS-2$
bf.setBindingType( Type.ONE_WAY );
bf.createBinding( model, "valid", okButton, "!disabled" );//$NON-NLS-1$ //$NON-NLS-2$
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:RepositoryConfigController.java
示例20: openDialog
import org.pentaho.ui.xul.containers.XulDialog; //导入依赖的package包/类
public void openDialog() throws Exception {
if (getEnabledAggs().size() == 0) {
XulMessageBox msgBox = (XulMessageBox) document.createElement(ELEM_ID_MESSAGEBOX);
msgBox.setMessage(Messages.getString("ExportHandler.NoAggsDefinedOrEnabled")); //$NON-NLS-1$
msgBox.open();
logger.info("Exiting showRelationalPreview as there are no Aggs defined");
return;
}
XulDialog dialog = (XulDialog) document.getElementById(ELEM_ID_EXPORT_DIALOG);
dialog.show();
}
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:13,代码来源:ExportHandler.java
注:本文中的org.pentaho.ui.xul.containers.XulDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论