private void clearPreviewComposite() { // First clear out the preview composite, then put in a text field showing the log text // // for ( Control control : previewComposite.getChildren() ) { control.dispose(); } }
private void setCompositeEnabled( Composite comp, boolean enabled ) { // TODO: move to TableView? comp.setEnabled( enabled ); for ( Control child : comp.getChildren() ) { child.setEnabled( enabled ); } }
public void setLook( Control widget ) { setLook( widget, WIDGET_STYLE_DEFAULT ); if ( widget instanceof Composite ) { for ( Control child : ( (Composite) widget ).getChildren() ) { setLook( child ); } } }
private void handleChilds( Composite composite ) { for ( Control el : composite.getChildren() ) { handleElement( el ); if ( el instanceof Composite ) { handleChilds( (Composite) el ); } } }
@Override public void widgetSelected( SelectionEvent selectionEvent ) { for ( Control control : contentArea.getChildren() ) { control.setVisible( false ); } content.setVisible( true ); } } );
/** * Gets the table views. * * @param parentControl the parent control * @param tableViews the table views * @return the table views */ private static final void getTableViews( Control parentControl, List<TableView> tableViews ) { if ( parentControl instanceof TableView ) { tableViews.add( (TableView) parentControl ); } else { if ( parentControl instanceof Composite ) { Control[] children = ( (Composite) parentControl ).getChildren(); for ( Control child : children ) { getTableViews( child, tableViews ); } } else { if ( parentControl instanceof Shell ) { Control[] children = ( (Shell) parentControl ).getChildren(); for ( Control child : children ) { getTableViews( child, tableViews ); } } } } }
/** * Grab the step debugging information from the dialog. Store it in our private map */ private void getStepDebugMeta() { int index = wSteps.getSelectionIndex(); if ( previousIndex >= 0 ) { // Is there anything on the composite to save yet? // if ( wComposite.getChildren().length == 0 ) { return; } StepMeta stepMeta = transDebugMeta.getTransMeta().getStep( previousIndex ); StepDebugMeta stepDebugMeta = new StepDebugMeta( stepMeta ); stepDebugMeta.setCondition( condition ); stepDebugMeta.setPausingOnBreakPoint( wPauseBreakPoint.getSelection() ); stepDebugMeta.setReadingFirstRows( wFirstRows.getSelection() ); stepDebugMeta.setRowCount( Const.toInt( wRowCount.getText(), -1 ) ); stepDebugMetaMap.put( stepMeta, stepDebugMeta ); } previousIndex = index; }
private void showLogTypeOptions( int index ) { if ( index != previousLogTableIndex ) { getLogInfo( previousLogTableIndex ); // clean the log options composite... // for ( Control control : wLogOptionsComposite.getChildren() ) { control.dispose(); } previousLogTableIndex = index; LogTableInterface logTable = logTables.get( index ); LogTableUserInterface logTableUserInterface = logTableUserInterfaces.get( index ); if ( logTableUserInterface != null ) { logTableUserInterface.showLogTableOptions( wLogOptionsComposite, logTable ); } else { if ( logTable instanceof JobLogTable ) { showJobLogTableOptions( (JobLogTable) logTable ); } else if ( logTable instanceof ChannelLogTable ) { showChannelLogTableOptions( (ChannelLogTable) logTable ); } if ( logTable instanceof JobEntryLogTable ) { showJobEntryLogTableOptions( (JobEntryLogTable) logTable ); } } wLogOptionsComposite.layout( true, true ); wLogComp.layout( true, true ); } }
for ( Control control : metricsComposite.getChildren() ) { if ( !control.isDisposed() ) { control.dispose();
for ( Control control : wDataComp.getChildren() ) { control.dispose();
for ( Control control : wComposite.getChildren() ) { control.dispose();
for ( Control control : metricsComposite.getChildren() ) { if ( !control.isDisposed() ) { control.dispose();
for ( Control control : wLogOptionsComposite.getChildren() ) { control.dispose();
for ( Control control : perfComposite.getChildren() ) { if ( !control.isDisposed() ) { control.dispose();
@Override protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { Control[] children= composite.getChildren(); Point size= new Point(0, 0); for (Control element : children) { Point s= element.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache); size.x += s.x; size.y= Math.max(size.y, s.y); } size.x += (Math.max(0, children.length -1) * fGap); return size; }
private boolean isChildVisible(Composite pb, Control child) { Control[] children= pb.getChildren(); for (int i= 0; i < children.length; i++) { if (children[i] == child && children[i].isVisible()) return true; } return false; }
@Override protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { Control[] children= composite.getChildren(); Point s= children[children.length - 1].computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache); if (fVerticalRuler != null && fIsVerticalRulerVisible) s.x += fVerticalRuler.getWidth() + fGap; return s; }
public void layout(Composite composite, boolean force) { Rectangle rect = composite.getClientArea(); Control[] children = composite.getChildren(); for (int i = 0; i < children.length; i++) { children[i].setSize(rect.width, rect.height); } } }
protected void disposeDeferredCreatedContent() { Control[] children= fParent.getChildren(); for (int i= 0; i < children.length; i++) { children[i].dispose(); } ToolBarManager toolBarManager= getToolBarManager(); if (toolBarManager != null) toolBarManager.removeAll(); }
private void clearPanel() { if ( panel.isDisposed()){ return; } Control[] controls = panel.getChildren(); for (int i = 0; i < controls.length; i++) { if (controls[i] != null && !controls[i].isDisposed()) controls[i].dispose(); } setTitle(""); setCurrentInfo(""); }