@Override public void widgetSelected( SelectionEvent e ) { offsetx = -sbHorizontal.getSelection(); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { removeCondition( cond_nr ); setModified(); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { // Move a condition down! // oper_nr = 1 : means move down setModified(); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { offsety = -sbVertical.getSelection(); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { editCondition( cond_nr ); setModified(); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { active_condition.negate(); widget.redraw(); setModified(); } } );
@Override public void widgetSelected( SelectionEvent e ) { Condition down = active_condition.getCondition( cond_nr ); active_condition.removeCondition( cond_nr ); active_condition.addCondition( cond_nr + 1, down ); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { Condition up = active_condition.getCondition( cond_nr ); active_condition.removeCondition( cond_nr ); active_condition.addCondition( cond_nr - 1, up ); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { // Move the condition lower: this means delete the condition from the active_condition. // After that, move it to the parent. Condition up = active_condition.getCondition( cond_nr ); active_condition.removeCondition( cond_nr ); Condition parent = parents.get( getLevel() - 1 ); parent.addCondition( up ); // Take a look upward... goUp(); widget.redraw(); } } );
@Override public void widgetSelected( SelectionEvent e ) { Condition c = new Condition(); c.setOperator( Condition.OPERATOR_AND ); sub.addCondition( c ); setModified(); widget.redraw(); } } );
private void addCondition() { Condition c = new Condition(); c.setOperator( Condition.OPERATOR_AND ); addCondition( c ); setModified(); widget.redraw(); }
public void openSpoon() { shell = getShell(); shell.setText( APP_TITLE ); mainComposite.setRedraw( true ); mainComposite.setVisible( false ); mainComposite.setVisible( true ); mainComposite.redraw(); // Perhaps the transformation contains elements at startup? refreshTree(); // Do a complete refresh then... setShellText(); }
@Override public void widgetSelected( SelectionEvent e ) { Condition c = active_condition.getCondition( cond_nr ); try { String xml = c.getXML(); GUIResource.getInstance().toClipboard( xml ); widget.redraw(); } catch ( Exception ex ) { new ErrorDialog( shell, "Error", "Error encoding to XML", ex ); } } } );
@Override public void widgetSelected( SelectionEvent e ) { // Move the condition lower: this means create a subcondition and put the condition there in the list. // Condition down = active_condition.getCondition( cond_nr ); Condition c = new Condition(); c.setOperator( down.getOperator() ); down.setOperator( Condition.OPERATOR_NONE ); active_condition.setCondition( cond_nr, c ); c.addCondition( down ); widget.redraw(); } } );
offsetx = -sbHorizontal.getSelection(); offsety = -sbVertical.getSelection(); widget.redraw();
/** * hideExpandedContent( TransGraph graph ) * * @param graph * the TransGraph whose web browser will be hidden */ public static void hideExpandedContent( TransGraph graph ) { doToExpandedContent( graph, browser -> { if ( Const.isOSX() && graph.isExecutionResultsPaneVisible() ) { graph.extraViewComposite.setVisible( true ); } browser.moveBelow( null ); browser.getParent().layout( true, true ); browser.getParent().redraw(); } ); }
/** * showExpandedContent( TransGraph graph ) * * @param graph * TransGraph to create the web browser for. If the wev browser hasn't been created this will create one. * Else it will just bring the web browser associated to this TransGraph to the top. */ public static void showExpandedContent( TransGraph graph ) { if ( graph == null ) { return; } Browser browser = getExpandedContentForTransGraph( graph ); if ( browser == null ) { return; } if ( !isVisible( graph ) ) { maximizeExpandedContent( browser ); } if ( Const.isOSX() && graph.isExecutionResultsPaneVisible() ) { graph.extraViewComposite.setVisible( false ); } browser.moveAbove( null ); browser.getParent().layout( true ); browser.getParent().redraw(); }
/** * maximizeBrowser * * @param browser * the browser object to maximize. We try to take up as much of the Spoon window as possible. */ private static void maximizeExpandedContent( Browser browser ) { SashForm sash = (SashForm) spoonInstance().getDesignParent(); int[] weights = sash.getWeights(); int[] savedSashWeights = new int[weights.length]; System.arraycopy( weights, 0, savedSashWeights, 0, weights.length ); spoonInstance().getTabSet().getSelected().setSashWeights( savedSashWeights ); weights[0] = 0; weights[1] = 1000; sash.setWeights( weights ); FormData formData = new FormData(); formData.top = new FormAttachment( 0, 0 ); formData.left = new FormAttachment( 0, 0 ); formData.bottom = new FormAttachment( 100, 0 ); formData.right = new FormAttachment( 100, 0 ); browser.setLayoutData( formData ); browser.getParent().layout( true ); browser.getParent().redraw(); } }
@Override public void widgetSelected( SelectionEvent e ) { String xml = GUIResource.getInstance().fromClipboard(); try { Document d = XMLHandler.loadXMLString( xml ); Node condNode = XMLHandler.getSubNode( d, "condition" ); if ( condNode != null ) { Condition c = new Condition( condNode ); active_condition.addCondition( cond_nr, c ); widget.redraw(); } else { new ErrorDialog( shell, BaseMessages.getString( PKG, "ConditionEditor.Error" ), BaseMessages .getString( PKG, "ConditionEditor.NoConditionFoundXML" ), new KettleXMLException( BaseMessages .getString( PKG, "ConditionEditor.NoConditionFoundXML.Exception", Const.CR + Const.CR + xml ) ) ); } } catch ( KettleXMLException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "ConditionEditor.Error" ), BaseMessages .getString( PKG, "ConditionEditor.ErrorParsingCondition" ), ex ); } } } );
@Override public void widgetSelected( SelectionEvent e ) { String xml = GUIResource.getInstance().fromClipboard(); try { Document d = XMLHandler.loadXMLString( xml ); Node condNode = XMLHandler.getSubNode( d, "condition" ); if ( condNode != null ) { Condition c = new Condition( condNode ); active_condition.addCondition( cond_nr + 1, c ); widget.redraw(); } else { new ErrorDialog( shell, BaseMessages.getString( PKG, "ConditionEditor.Error" ), BaseMessages .getString( PKG, "ConditionEditor.NoConditionFoundXML" ), new KettleXMLException( BaseMessages .getString( PKG, "ConditionEditor.NoConditionFoundXML.Exception", Const.CR + Const.CR + xml ) ) ); } } catch ( KettleXMLException ex ) { new ErrorDialog( shell, BaseMessages.getString( PKG, "ConditionEditor.Error" ), BaseMessages .getString( PKG, "ConditionEditor.ErrorParsingCondition" ), ex ); } } } );