List of usage examples for org.eclipse.jface.resource JFaceResources getBannerFont
public static Font getBannerFont()
From source file:org.eclipse.birt.chart.reportitem.ui.StandardChartDataSheet.java
License:Open Source License
private Composite createTreeViewComposite(Composite parent) { Composite cubeTreeComp = ChartUIUtil.createCompositeWrapper(parent); treeViewerTitle = new Label(cubeTreeComp, SWT.NONE); {/*from w w w .j av a 2 s . com*/ treeViewerTitle.setText(Messages.getString("StandardChartDataSheet.Label.CubeTree")); //$NON-NLS-1$ treeViewerTitle.setFont(JFaceResources.getBannerFont()); } if (!dataProvider.isInXTabMeasureCell() && !dataProvider.isInMultiView()) { // No description if dnd is disabled treeViewerDescription = new Label(cubeTreeComp, SWT.WRAP); { GridData gd = new GridData(GridData.FILL_HORIZONTAL); treeViewerDescription.setLayoutData(gd); treeViewerDescription.setText(getCubeTreeViewNote()); } } treeViewer = new TreeViewer(cubeTreeComp, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); treeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH)); ((GridData) treeViewer.getTree().getLayoutData()).heightHint = 120; ViewsTreeProvider provider = createCubeViewProvider(); treeViewer.setLabelProvider(provider); treeViewer.setContentProvider(provider); treeViewer.setInput(getCube()); if (!Platform.getOS().equals(Platform.OS_MACOSX)) { final DragSource dragSource = new DragSource(treeViewer.getTree(), DND.DROP_COPY); dragSource.setTransfer(new Transfer[] { SimpleTextTransfer.getInstance() }); dragSource.addDragListener(new DragSourceListener() { private String text = null; public void dragFinished(DragSourceEvent event) { // TODO Auto-generated method stub } public void dragSetData(DragSourceEvent event) { event.data = text; } public void dragStart(DragSourceEvent event) { text = getDraggableCubeExpression(); if (text == null) { event.doit = false; } } }); } treeViewer.getTree().addListener(SWT.MouseDown, new Listener() { public void handleEvent(Event event) { if (event.button == 3 && event.widget instanceof Tree) { Tree tree = (Tree) event.widget; TreeItem treeItem = tree.getSelection()[0]; if (dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY)) { tree.setMenu(null); } else { tree.setMenu(createMenuManager(getHandleFromSelection(treeItem.getData())) .createContextMenu(tree)); // tree.getMenu( ).setVisible( true ); } } } }); return cubeTreeComp; }
From source file:org.eclipse.birt.chart.reportitem.ui.StandardChartDataSheet.java
License:Open Source License
private Composite createTableViewComposite(Composite parent) { Composite tabularDataViewComp = ChartUIUtil.createCompositeWrapper(parent); Label label = new Label(tabularDataViewComp, SWT.NONE); {//from www . j a v a 2 s. c om label.setText(Messages.getString("StandardChartDataSheet.Label.DataPreview")); //$NON-NLS-1$ label.setFont(JFaceResources.getBannerFont()); } if (!dataProvider.isInXTabMeasureCell() && !dataProvider.isInMultiView()) { dataPreviewDescription = new Label(tabularDataViewComp, SWT.WRAP); { GridData gd = new GridData(GridData.FILL_HORIZONTAL); dataPreviewDescription.setLayoutData(gd); dataPreviewDescription.setText(getDataPreviewDescription()); } } btnShowDataPreviewA = new Button(tabularDataViewComp, SWT.CHECK); btnShowDataPreviewA.setText(Messages.getString("StandardChartDataSheet.Label.ShowDataPreview")); //$NON-NLS-1$ btnShowDataPreviewA.addListener(SWT.Selection, this); tablePreview = new CustomPreviewTable(tabularDataViewComp, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION); { GridData gridData = new GridData(GridData.FILL_BOTH); gridData.widthHint = 400; gridData.heightHint = 120; tablePreview.setLayoutData(gridData); tablePreview.setHeaderAlignment(SWT.LEFT); tablePreview.addListener(CustomPreviewTable.MOUSE_RIGHT_CLICK_TYPE, this); } return tabularDataViewComp; }
From source file:org.eclipse.birt.chart.reportitem.ui.StandardChartDataSheet.java
License:Open Source License
private Composite createColumnListViewComposite(Composite parent) { Composite columnsListDataViewComp = ChartUIUtil.createCompositeWrapper(parent); Label label = new Label(columnsListDataViewComp, SWT.NONE); {/*from www .j av a 2s . c o m*/ label.setText(Messages.getString("StandardChartDataSheet.Label.DataPreview")); //$NON-NLS-1$ label.setFont(JFaceResources.getBannerFont()); } if (!dataProvider.isInXTabMeasureCell()) { columnListDescription = new Label(columnsListDataViewComp, SWT.WRAP); { GridData gd = new GridData(GridData.FILL_HORIZONTAL); columnListDescription.setLayoutData(gd); columnListDescription.setText(getDataPreviewDescription()); } } btnShowDataPreviewB = new Button(columnsListDataViewComp, SWT.CHECK); btnShowDataPreviewB.setText(Messages.getString("StandardChartDataSheet.Label.ShowDataPreview")); //$NON-NLS-1$ btnShowDataPreviewB.addListener(SWT.Selection, this); // Add a list to display all columns. final Table table = new Table(columnsListDataViewComp, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION); GridData gd = new GridData(GridData.FILL_BOTH); table.setLayoutData(gd); table.setLinesVisible(true); tableViewerColumns = new TableViewer(table); tableViewerColumns.setUseHashlookup(true); new TableColumn(table, SWT.LEFT); table.addMouseMoveListener(new MouseMoveListener() { @SuppressWarnings("unchecked") public void mouseMove(MouseEvent e) { if (!dataProvider.isLivePreviewEnabled()) { table.setToolTipText(null); return; } String tooltip = null; TableItem item = ((Table) e.widget).getItem(new Point(e.x, e.y)); if (item != null) { List<Object[]> data = (List<Object[]>) tableViewerColumns.getData(KEY_PREVIEW_DATA); if (data != null) { StringBuilder sb = new StringBuilder(); int index = ((Table) e.widget).indexOf(item); int i = 0; for (; i < data.size(); i++) { if (sb.length() > 45) { break; } if (data.get(i)[index] != null) { if (i != 0) sb.append("; "); //$NON-NLS-1$ sb.append(String.valueOf(data.get(i)[index])); } } if (i == 1 && sb.length() > 45) { sb = new StringBuilder(sb.substring(0, 45)); sb.append("...");//$NON-NLS-1$ } else if (i < data.size()) { sb.append(";..."); //$NON-NLS-1$ } tooltip = sb.toString(); } } table.setToolTipText(tooltip); } }); table.addMenuDetectListener(new MenuDetectListener() { public void menuDetected(MenuDetectEvent arg0) { if (isCubeMode()) { // share cube table.setMenu(null); } else { TableItem item = table.getSelection()[0]; if (item == null) { tableViewerColumns.getTable().select(-1); } // Bind context menu to each header button boolean isSharingChart = dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY); if (item != null && !isSharingChart) { if (table.getMenu() != null) { table.getMenu().dispose(); } table.setMenu(createMenuManager(item.getData()).createContextMenu(table)); } else { table.setMenu(null); } if (table.getMenu() != null && !isSharingChart) { table.getMenu().setVisible(true); } } } }); table.addListener(SWT.Resize, new Listener() { public void handleEvent(Event event) { Table table = (Table) event.widget; int totalWidth = table.getClientArea().width; table.getColumn(0).setWidth(totalWidth); } }); if (!Platform.getOS().equals(Platform.OS_MACOSX)) { // Set drag/drop. DragSource ds = new DragSource(table, DND.DROP_COPY | DND.DROP_MOVE); ds.setTransfer(new Transfer[] { SimpleTextTransfer.getInstance() }); ColumnNamesTableDragListener dragSourceAdapter = new ColumnNamesTableDragListener(table, itemHandle); ds.addDragListener(dragSourceAdapter); } tableViewerColumns.setContentProvider(new IStructuredContentProvider() { /** * Gets the food items for the list * * @param arg0 * the data model * @return Object[] */ public Object[] getElements(Object arg0) { if (arg0 == null) return null; return (ColumnBindingInfo[]) arg0; } /** * Disposes any created resources */ public void dispose() { // Do nothing } /** * Called when the input changes * * @param arg0 * the viewer * @param arg1 * the old input * @param arg2 * the new input */ public void inputChanged(Viewer arg0, Object arg1, Object arg2) { // Do nothing } }); tableViewerColumns.setLabelProvider(new ILabelProvider() { /** * images * * @param arg0 * the element * @return Image */ public Image getImage(Object arg0) { String imageName = ((ColumnBindingInfo) arg0).getImageName(); if (imageName == null) return null; return UIHelper.getImage(imageName); } /** * Gets the text for an element * * @param arg0 * the element * @return String */ public String getText(Object arg0) { return ((ColumnBindingInfo) arg0).getName(); } /** * Adds a listener * * @param arg0 * the listener */ public void addListener(ILabelProviderListener arg0) { // Throw it away } /** * Disposes any resources */ public void dispose() { // Nothing to dispose } /** * Returns whether changing the specified property for the specified * element affect the label * * @param arg0 * the element * @param arg1 * the property * @return boolean */ public boolean isLabelProperty(Object arg0, String arg1) { return false; } /** * Removes a listener * * @param arg0 * the listener */ public void removeListener(ILabelProviderListener arg0) { // Ignore } }); return columnsListDataViewComp; }
From source file:org.eclipse.birt.chart.reportitem.ui.StandardChartDataSheet.java
License:Open Source License
@Override public Composite createDataSelector(Composite parent) { parentComposite = parent;/*from ww w . jav a 2 s.c o m*/ // select the only data set if (itemHandle.getDataBindingType() == ReportItemHandle.DATABINDING_TYPE_NONE && itemHandle.getContainer() instanceof ModuleHandle) { DataSetInfo[] dataSets = dataProvider.getAllDataSets(); if (dataProvider.getAllDataCubes().length == 0 && dataSets.length == 1) { dataProvider.setDataSet(dataSets[0]); } } Composite cmpDataSet = ChartUIUtil.createCompositeWrapper(parent); { cmpDataSet.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); } Label label = new Label(cmpDataSet, SWT.NONE); { label.setText(Messages.getString("StandardChartDataSheet.Label.SelectDataSet")); //$NON-NLS-1$ label.setFont(JFaceResources.getBannerFont()); } Composite cmpDetail = new Composite(cmpDataSet, SWT.NONE); { GridLayout gridLayout = new GridLayout(2, false); gridLayout.marginWidth = 10; gridLayout.marginHeight = 0; cmpDetail.setLayout(gridLayout); cmpDetail.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); } Composite compRadios = ChartUIUtil.createCompositeWrapper(cmpDetail); { GridData gd = new GridData(); gd.verticalSpan = 2; compRadios.setLayoutData(gd); } btnInherit = new Button(compRadios, SWT.RADIO); btnInherit.setText(Messages.getString("StandardChartDataSheet.Label.UseReportData")); //$NON-NLS-1$ btnInherit.addListener(SWT.Selection, this); btnUseData = new Button(compRadios, SWT.RADIO); btnUseData.setText(Messages.getString("StandardChartDataSheet.Label.UseDataSet")); //$NON-NLS-1$ btnUseData.addListener(SWT.Selection, this); cmbInherit = new CCombo(cmpDetail, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER); cmbInherit.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); cmbInherit.addListener(SWT.Selection, this); cmbDataItems = new DataItemCombo(cmpDetail, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER) { @Override public boolean triggerSelection(int index) { int selectState = selectDataTypes.get(index).intValue(); if (selectState == SELECT_NEW_DATASET || selectState == SELECT_NEW_DATACUBE) { return false; } return true; } @Override public boolean skipSelection(int index) { //skip out of boundary selection if (index >= 0) { int selectState = selectDataTypes.get(index).intValue(); if (selectState == SELECT_NEXT) { return true; } } return false; } }; cmbDataItems.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); cmbDataItems.addListener(SWT.Selection, this); cmbDataItems.setVisibleItemCount(30); initDataSelector(); updatePredefinedQueries(); checkDataBinding(); if (dataProvider.checkState(IDataServiceProvider.IN_MULTI_VIEWS)) { autoSelect(false); } return cmpDataSet; }
From source file:org.eclipse.birt.chart.ui.swt.wizard.format.axis.AxisSheetImpl.java
License:Open Source License
public void createControl(Composite parent) { ChartUIUtil.bindHelp(parent, ChartHelpContextIds.SUBTASK_AXIS); enableAxisPercent = ChartUtil.isStudyLayout(getChart()); int columnNumber = 6; if (enableAxisPercent) columnNumber++;/*from www.j a v a2 s . c om*/ cmpContent = new Composite(parent, SWT.NONE) { public Point computeSize(int wHint, int hHint, boolean changed) { // Return a fixed height as preferred size of scrolled composite Point p = super.computeSize(wHint, hHint, changed); p.y = 200; return p; } }; { GridLayout glContent = new GridLayout(1, false); glContent.horizontalSpacing = HORIZONTAL_SPACING; cmpContent.setLayout(glContent); GridData gd = new GridData(GridData.FILL_BOTH); cmpContent.setLayoutData(gd); } ScrolledComposite cmpScroll = new ScrolledComposite(cmpContent, SWT.V_SCROLL); { GridData gd = new GridData(GridData.FILL_BOTH); cmpScroll.setLayoutData(gd); cmpScroll.setMinHeight( (ChartUIUtil.getOrthogonalAxisNumber(getChart()) + (ChartUIUtil.is3DType(getChart()) ? 2 : 1)) * 24 + 80); cmpScroll.setExpandVertical(true); cmpScroll.setExpandHorizontal(true); } Composite cmpList = new Composite(cmpScroll, SWT.NONE); { GridLayout glContent = new GridLayout(columnNumber, false); glContent.horizontalSpacing = 10; cmpList.setLayout(glContent); cmpScroll.setContent(cmpList); } Label lblAxis = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblAxis.setLayoutData(gd); lblAxis.setFont(JFaceResources.getBannerFont()); lblAxis.setText(Messages.getString("AxisSheetImpl.Label.Axis")); //$NON-NLS-1$ } Label lblType = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblType.setLayoutData(gd); lblType.setFont(JFaceResources.getBannerFont()); lblType.setText(Messages.getString("AxisSheetImpl.Label.Type")); //$NON-NLS-1$ } Label lblColor = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblColor.setLayoutData(gd); lblColor.setFont(JFaceResources.getBannerFont()); lblColor.setText(Messages.getString("AxisSheetImpl.Label.Color")); //$NON-NLS-1$ } Label lblVisible = new Label(cmpList, SWT.WRAP | SWT.CENTER); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblVisible.setLayoutData(gd); lblVisible.setFont(JFaceResources.getBannerFont()); lblVisible.setText(Messages.getString("AxisSheetImpl.Label.Visible")); //$NON-NLS-1$ } Label lblAligned = new Label(cmpList, SWT.WRAP | SWT.CENTER); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblAligned.setLayoutData(gd); lblAligned.setFont(JFaceResources.getBannerFont()); lblAligned.setText(Messages.getString("AxisSheetImpl.Label.Aligned")); //$NON-NLS-1$ } Label lblSideBySide = new Label(cmpList, SWT.WRAP | SWT.CENTER); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblSideBySide.setLayoutData(gd); lblSideBySide.setFont(JFaceResources.getBannerFont()); lblSideBySide.setText(Messages.getString("AxisSheetImpl.Label.SideBySide")); //$NON-NLS-1$ } if (enableAxisPercent) { Label lblAxisPercent = new Label(cmpList, SWT.WRAP | SWT.CENTER); GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblAxisPercent.setLayoutData(gd); lblAxisPercent.setFont(JFaceResources.getBannerFont()); lblAxisPercent.setText(Messages.getString("AxisSheetImpl.Label.AxisPercent")); //$NON-NLS-1$ } int treeIndex = 0; // Category axis. new AxisOptionChoser(ChartUIUtil.getAxisXForProcessing((ChartWithAxes) getChart()), Messages.getString("AxisSheetImpl.Label.CategoryX"), //$NON-NLS-1$ AngleType.X, treeIndex++, DefaultValueProvider.defChartWithAxes().getBaseAxes()[0]) .placeComponents(cmpList); // Y axes. int yaxisNumber = ChartUIUtil.getOrthogonalAxisNumber(getChart()); for (int i = 0; i < yaxisNumber; i++) { String text = Messages.getString("AxisSheetImpl.Label.ValueY"); //$NON-NLS-1$ new AxisOptionChoser(ChartUIUtil.getAxisYForProcessing((ChartWithAxes) getChart(), i), yaxisNumber == 1 ? text : (text + " - " + (i + 1)), //$NON-NLS-1$ AngleType.Y, treeIndex++, DefaultValueProvider.defChartWithAxes().getBaseAxes()[0].getAssociatedAxes().get(0)) .placeComponents(cmpList); } // Z axis. if (ChartUIUtil.is3DType(getChart())) { new AxisOptionChoser(ChartUIUtil.getAxisZForProcessing((ChartWithAxes) getChart()), Messages.getString("AxisSheetImpl.Label.AncillaryZ"), //$NON-NLS-1$ AngleType.Z, treeIndex++, DefaultValueProvider.defChartWithAxes().getBaseAxes()[0].getAncillaryAxes().get(0)) .placeComponents(cmpList); } }
From source file:org.eclipse.birt.chart.ui.swt.wizard.format.chart.ChartPlotSheetImpl.java
License:Open Source License
protected void createControlForAreaIncludingAxes(Composite cmpBasic, int fillStyles) { Label lblIncludingAxes = new Label(cmpBasic, SWT.NONE); {//from ww w . j ava 2 s .c o m GridData gd = new GridData(); gd.horizontalSpan = 2; lblIncludingAxes.setLayoutData(gd); lblIncludingAxes.setFont(JFaceResources.getBannerFont()); lblIncludingAxes.setText(getChart() instanceof ChartWithAxes ? Messages.getString("ChartPlotSheetImpl.Label.AreaIncludingAxes") //$NON-NLS-1$ : Messages.getString("ChartPlotSheetImpl.Label.PlotArea")); //$NON-NLS-1$ } new Label(cmpBasic, SWT.NONE).setText(Messages.getString("ChartPlotSheetImpl.Label.Background")); //$NON-NLS-1$ cmbBlockColor = new FillChooserComposite(cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY, fillStyles, getContext(), getChart().getPlot().getBackground()); { GridData gd = new GridData(); gd.widthHint = 200; cmbBlockColor.setLayoutData(gd); cmbBlockColor.addListener(this); } new Label(cmpBasic, SWT.NONE).setText(Messages.getString("ChartPlotSheetImpl.Label.Outline")); //$NON-NLS-1$ btnIncludingVisible = getContext().getUIFactory().createChartCheckbox(cmpBasic, SWT.NONE, DefaultValueProvider.defChartWithAxes().getPlot().getOutline().isVisible()); btnIncludingVisible.setText(Messages.getString("ChartPlotSheetImpl.Label.Visible")); //$NON-NLS-1$ btnIncludingVisible .setSelectionState(getChart().getPlot().getOutline().isSetVisible() ? (getChart().getPlot().getOutline().isVisible() ? ChartCheckbox.STATE_SELECTED : ChartCheckbox.STATE_UNSELECTED) : ChartCheckbox.STATE_GRAYED); btnIncludingVisible.addSelectionListener(this); }
From source file:org.eclipse.birt.chart.ui.swt.wizard.format.chart.ChartPlotSheetImpl.java
License:Open Source License
protected void createControlForAreaWithinAxes(Composite cmpBasic, int fillStyles) { Label lblWithinAxes = new Label(cmpBasic, SWT.NONE); {/*from w w w . j a v a2 s .com*/ GridData gd = new GridData(); gd.horizontalSpan = 2; lblWithinAxes.setLayoutData(gd); lblWithinAxes.setFont(JFaceResources.getBannerFont()); lblWithinAxes.setText(getChart() instanceof ChartWithAxes ? Messages.getString("ChartPlotSheetImpl.Label.AreaWithinAxes") //$NON-NLS-1$ : Messages.getString("ChartPlotSheetImpl.Label.ClientArea")); //$NON-NLS-1$ } // WithinAxes area is not supported in 3D if (enableAreaWithinAxesUI()) { new Label(cmpBasic, SWT.NONE).setText(Messages.getString("ChartPlotSheetImpl.Label.Background2")); //$NON-NLS-1$ cmbClientAreaColor = new FillChooserComposite(cmpBasic, SWT.DROP_DOWN | SWT.READ_ONLY, fillStyles, getContext(), getChart().getPlot().getClientArea().getBackground()); { GridData gridData = new GridData(); gridData.widthHint = 200; cmbClientAreaColor.setLayoutData(gridData); cmbClientAreaColor.addListener(this); } } // Following settings only work in some criteria boolean is3DWallFloorSet = ChartUIUtil.is3DWallFloorSet(getChart()); lblVisibleWithin = new Label(cmpBasic, SWT.NONE); { lblVisibleWithin.setText(Messages.getString("ChartPlotSheetImpl.Label.Outline")); //$NON-NLS-1$ lblVisibleWithin.setEnabled(is3DWallFloorSet); } btnWithinVisible = getContext().getUIFactory().createChartCheckbox(cmpBasic, SWT.NONE, DefaultValueProvider.defChartWithAxes().getPlot().getClientArea().getOutline().isVisible()); btnWithinVisible.setText(Messages.getString("ChartPlotSheetImpl.Label.Visible2")); //$NON-NLS-1$ btnWithinVisible.setSelectionState(getChart().getPlot().getClientArea().getOutline().isSetVisible() ? (getChart().getPlot().getClientArea().getOutline().isVisible() ? ChartCheckbox.STATE_SELECTED : ChartCheckbox.STATE_UNSELECTED) : ChartCheckbox.STATE_GRAYED); btnWithinVisible.setEnabled(is3DWallFloorSet); if (!btnWithinVisible.getEnabled()) { // Hide for 3D btnWithinVisible.setSelectionState(ChartCheckbox.STATE_UNSELECTED); } btnWithinVisible.addSelectionListener(this); }
From source file:org.eclipse.birt.chart.ui.swt.wizard.format.series.SeriesSheetImpl.java
License:Open Source License
protected void createSeriesOptionsLabels() { Label lblSeries = new Label(cmpList, SWT.WRAP); {/*from www . jav a2 s . c om*/ GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblSeries.setLayoutData(gd); lblSeries.setFont(JFaceResources.getBannerFont()); lblSeries.setText(Messages.getString("SeriesSheetImpl.Label.Series")); //$NON-NLS-1$ } Label lblTitle = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblTitle.setLayoutData(gd); lblTitle.setFont(JFaceResources.getBannerFont()); lblTitle.setText(Messages.getString("SeriesSheetImpl.Label.Title")); //$NON-NLS-1$ } Label lblType = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblType.setLayoutData(gd); lblType.setFont(JFaceResources.getBannerFont()); lblType.setText(Messages.getString("SeriesSheetImpl.Label.Type")); //$NON-NLS-1$ } Label lblZOrder = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblZOrder.setLayoutData(gd); lblZOrder.setFont(JFaceResources.getBannerFont()); lblZOrder.setText(Messages.getString("SeriesSheetImpl.Label.ZOrder")); //$NON-NLS-1$ } Label lblVisible = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblVisible.setLayoutData(gd); lblVisible.setFont(JFaceResources.getBannerFont()); lblVisible.setText(Messages.getString("SeriesSheetImpl.Label.Visible")); //$NON-NLS-1$ } Label lblStack = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblStack.setLayoutData(gd); lblStack.setFont(JFaceResources.getBannerFont()); lblStack.setText(Messages.getString("SeriesSheetImpl.Label.Stacked")); //$NON-NLS-1$ } Label lblTranslucent = new Label(cmpList, SWT.WRAP); { GridData gd = new GridData(); gd.horizontalAlignment = SWT.CENTER; lblTranslucent.setLayoutData(gd); lblTranslucent.setFont(JFaceResources.getBannerFont()); lblTranslucent.setText(Messages.getString("SeriesSheetImpl.Label.Translucent")); //$NON-NLS-1$ } }
From source file:org.eclipse.birt.chart.ui.swt.wizard.TaskFormatChart.java
License:Open Source License
private void initDetailHeader(Composite parent) { lblNodeTitle = new Label(parent, SWT.NONE); {/*from www . j a v a 2 s.co m*/ GridData gd = new GridData(GridData.FILL_HORIZONTAL); lblNodeTitle.setLayoutData(gd); lblNodeTitle.setFont(JFaceResources.getBannerFont()); } Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL); { GridData gd = new GridData(GridData.FILL_HORIZONTAL); separator.setLayoutData(gd); } }
From source file:org.eclipse.birt.chart.ui.swt.wizard.TaskSelectData.java
License:Open Source License
private void createPreviewArea(Composite parent) { Composite cmpPreview = ChartUIUtil.createCompositeWrapper(parent); {/*from w w w . ja va2 s .c om*/ GridData gridData = new GridData(GridData.FILL_BOTH); gridData.widthHint = CENTER_WIDTH_HINT; gridData.heightHint = 200; cmpPreview.setLayoutData(gridData); } Label label = new Label(cmpPreview, SWT.NONE); { label.setFont(JFaceResources.getBannerFont()); label.setText(Messages.getString("TaskSelectData.Label.ChartPreview")); //$NON-NLS-1$ } previewCanvas = new Canvas(cmpPreview, SWT.BORDER); { GridData gd = new GridData(GridData.FILL_BOTH); previewCanvas.setLayoutData(gd); previewCanvas.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); } }