本文整理汇总了Java中org.pentaho.ui.xul.containers.XulRoot类的典型用法代码示例。如果您正苦于以下问题:Java XulRoot类的具体用法?Java XulRoot怎么用?Java XulRoot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XulRoot类属于org.pentaho.ui.xul.containers包,在下文中一共展示了XulRoot类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preview
import org.pentaho.ui.xul.containers.XulRoot; //导入依赖的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);
}
}
示例2: showMessage
import org.pentaho.ui.xul.containers.XulRoot; //导入依赖的package包/类
protected void showMessage(String message, boolean scroll){
try{
XulMessageBox box = (XulMessageBox) document.createElement("messagebox"); //$NON-NLS-1$
box.setMessage(message);
box.setModalParent( ((XulRoot)document.getElementById("general-datasource-window")).getRootObject());
if(scroll){
box.setScrollable(true);
box.setWidth(500);
box.setHeight(400);
}
box.open();
} catch(XulException e){
System.out.println("Error creating messagebox "+e.getMessage());
}
}
示例3: show
import org.pentaho.ui.xul.containers.XulRoot; //导入依赖的package包/类
@SuppressWarnings( "deprecation" )
@Override
public void show( boolean force ) {
if ( ( force ) || ( !buttonsCreated ) ) {
setButtons();
}
isDialogHidden = false;
dialog.getShell().setText( title );
// Remember the size from a last time or do proper layouting of the window.
//
if ( getWidth() > 0 && getHeight() > 0 ) {
BaseStepDialog.setSize( getShell(), getWidth(), getHeight(), true );
} else {
BaseStepDialog.setSize( getShell() );
}
width = getShell().getSize().x;
height = getShell().getSize().y;
dialog.getShell().layout( true, true );
// Timing is everything - fire the onLoad events so that anyone who is trying to listens gets notified
//
notifyListeners( XulRoot.EVENT_ON_LOAD );
setAppicon( appIcon );
returnCode = dialog.open();
}
示例4: showMessage
import org.pentaho.ui.xul.containers.XulRoot; //导入依赖的package包/类
protected void showMessage( String message, boolean scroll ) {
try {
XulMessageBox box = (XulMessageBox) document.createElement( "messagebox" );
box.setMessage( message );
box.setModalParent( ( (XulRoot) document.getElementById( "general-datasource-window" ) ).getRootObject() );
if ( scroll ) {
box.setScrollable( true );
box.setWidth( 500 );
box.setHeight( 400 );
}
box.open();
} catch ( XulException e ) {
System.out.println( "Error creating messagebox " + e.getMessage() );
}
}
示例5: setUp
import org.pentaho.ui.xul.containers.XulRoot; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
dataHandler = new DataHandler();
xulDomContainer = mock( XulDomContainer.class );
document = mock( Document.class );
XulComponent rootElement = mock( XulComponent.class );
when( document.getRootElement() ).thenReturn( rootElement );
// Mock the UI components
accessBox = mock( XulListbox.class );
when( document.getElementById( "access-type-list" ) ).thenReturn( accessBox );
connectionBox = mock( XulListbox.class );
when( document.getElementById( "connection-type-list" ) ).thenReturn( connectionBox );
connectionNameBox = mock( XulTextbox.class );
when( document.getElementById( "connection-name-text" ) ).thenReturn( connectionNameBox );
dialogDeck = mock( XulDeck.class );
when( document.getElementById( "dialog-panel-deck" ) ).thenReturn( dialogDeck );
deckOptionsBox = mock( XulListbox.class );
when( document.getElementById( "deck-options-list" ) ).thenReturn( deckOptionsBox );
hostNameBox = mock( XulTextbox.class );
when( document.getElementById( "server-host-name-text" ) ).thenReturn( hostNameBox );
databaseNameBox = mock( XulTextbox.class );
when( document.getElementById( "database-name-text" ) ).thenReturn( databaseNameBox );
portNumberBox = mock( XulTextbox.class );
when( document.getElementById( "port-number-text" ) ).thenReturn( portNumberBox );
userNameBox = mock( XulTextbox.class );
when( document.getElementById( "username-text" ) ).thenReturn( userNameBox );
passwordBox = mock( XulTextbox.class );
when( document.getElementById( "password-text" ) ).thenReturn( passwordBox );
serverInstanceBox = mock( XulTextbox.class );
when( document.getElementById( "instance-text" ) ).thenReturn( serverInstanceBox );
when( serverInstanceBox.getValue() ).thenReturn( "instance" );
when( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ).thenReturn( "true" );
webappName = mock( XulTextbox.class );
when( document.getElementById( "web-application-name-text" ) ).thenReturn( webappName );
when( webappName.getValue() ).thenReturn( "webappName" );
messageBox = mock( XulMessageBox.class );
when( document.createElement( "messagebox" ) ).thenReturn( messageBox );
when( xulDomContainer.getDocumentRoot() ).thenReturn( document );
generalDatasourceWindow = mock( XulRoot.class );
when( generalDatasourceWindow.getRootObject() ).thenReturn( mock( XulComponent.class ) );
when( document.getElementById( "general-datasource-window" ) ).thenReturn( generalDatasourceWindow );
dataHandler.setXulDomContainer( xulDomContainer );
}