List of usage examples for org.eclipse.swt.widgets Label getDisplay
public Display getDisplay()
Display
that is associated with the receiver. From source file:grafici.PazientiTimeSeriesChart.java
/** * A demonstration application showing how to create a simple time series * chart. This example uses monthly data. * * @param title the frame title.//from w ww . j a v a 2 s . co m */ public PazientiTimeSeriesChart(String title, Composite parent, int style, int tipo) { super(parent, style); Label titolo = new Label(this, SWT.NONE); titolo.setFont(new Font(titolo.getDisplay(), "arial", 15, SWT.BOLD)); titolo.setText(title); GridData gdLbl = new GridData(SWT.FILL); titolo.setLayoutData(gdLbl); Composite cmp = new Composite(this, SWT.FILL | SWT.EMBEDDED); GridData gdCmp = new GridData(SWT.FILL); gdCmp.horizontalAlignment = SWT.FILL; gdCmp.verticalAlignment = SWT.FILL; gdCmp.grabExcessHorizontalSpace = true; gdCmp.grabExcessVerticalSpace = true; cmp.setLayoutData(gdCmp); cmp.setLayout(new GridLayout(1, false)); JPanel chartPanel = createDemoPanel(tipo); Frame graphFrame = SWT_AWT.new_Frame(cmp); graphFrame.add(chartPanel); graphFrame.pack(); GridData gdThis = new GridData(SWT.FILL); gdThis.horizontalAlignment = SWT.FILL; gdThis.verticalAlignment = SWT.FILL; gdThis.grabExcessHorizontalSpace = true; gdThis.grabExcessVerticalSpace = true; this.setLayoutData(gdThis); this.setLayout(new GridLayout(1, false)); }
From source file:grafici.FattureTimeSeriesChart.java
/** * A demonstration application showing how to create a simple time series * chart. This example uses monthly data. * //from ww w . j a va 2 s. c om * @param title * the frame title. */ public FattureTimeSeriesChart(String title, Composite parent, int style, int tipo) { super(parent, style); System.out.println(2); Label titolo = new Label(this, SWT.NONE); titolo.setFont(new Font(titolo.getDisplay(), "arial", 15, SWT.BOLD)); titolo.setText(title); GridData gdLbl = new GridData(SWT.FILL); titolo.setLayoutData(gdLbl); Composite cmp = new Composite(this, SWT.FILL | SWT.EMBEDDED); GridData gdCmp = new GridData(SWT.FILL); gdCmp.horizontalAlignment = SWT.FILL; gdCmp.verticalAlignment = SWT.FILL; gdCmp.grabExcessHorizontalSpace = true; gdCmp.grabExcessVerticalSpace = true; cmp.setLayoutData(gdCmp); cmp.setLayout(new GridLayout(1, false)); JPanel chartPanel = createPanel(tipo); Frame graphFrame = SWT_AWT.new_Frame(cmp); graphFrame.add(chartPanel); graphFrame.pack(); GridData gdThis = new GridData(SWT.FILL); gdThis.horizontalAlignment = SWT.FILL; gdThis.verticalAlignment = SWT.FILL; gdThis.grabExcessHorizontalSpace = true; gdThis.grabExcessVerticalSpace = true; this.setLayoutData(gdThis); this.setLayout(new GridLayout(1, false)); }
From source file:grafici.MediciTimeSeriesChart.java
/** * A demonstration application showing how to create a simple time series * chart. This example uses monthly data. * //from w w w . j av a 2 s .c o m * @param title * the frame title. */ public MediciTimeSeriesChart(String title, Composite parent, int style, int tipo) { super(parent, style); Label titolo = new Label(this, SWT.NONE); titolo.setFont(new Font(titolo.getDisplay(), "arial", 15, SWT.BOLD)); titolo.setText(title); GridData gdLbl = new GridData(SWT.FILL); titolo.setLayoutData(gdLbl); Composite cmp = new Composite(this, SWT.FILL | SWT.EMBEDDED); GridData gdCmp = new GridData(SWT.FILL); gdCmp.horizontalAlignment = SWT.FILL; gdCmp.verticalAlignment = SWT.FILL; gdCmp.grabExcessHorizontalSpace = true; gdCmp.grabExcessVerticalSpace = true; cmp.setLayoutData(gdCmp); cmp.setLayout(new GridLayout(1, false)); JPanel chartPanel = createDemoPanel(tipo); Frame graphFrame = SWT_AWT.new_Frame(cmp); graphFrame.add(chartPanel); graphFrame.pack(); GridData gdThis = new GridData(SWT.FILL); gdThis.horizontalAlignment = SWT.FILL; gdThis.verticalAlignment = SWT.FILL; gdThis.grabExcessHorizontalSpace = true; gdThis.grabExcessVerticalSpace = true; this.setLayoutData(gdThis); this.setLayout(new GridLayout(1, false)); }
From source file:grafici.PrenotazioneTimeSeriesChart.java
/** * A demonstration application showing how to create a simple time series * chart. This example uses monthly data. * //w w w . j av a2 s . co m * @param title * the frame title. */ public PrenotazioneTimeSeriesChart(String title, Composite parent, int style, int tipo) { super(parent, style); Label titolo = new Label(this, SWT.NONE); titolo.setFont(new Font(titolo.getDisplay(), "arial", 15, SWT.BOLD)); titolo.setText(title); GridData gdLbl = new GridData(SWT.FILL); titolo.setLayoutData(gdLbl); Composite cmp = new Composite(this, SWT.FILL | SWT.EMBEDDED); GridData gdCmp = new GridData(SWT.FILL); gdCmp.horizontalAlignment = SWT.FILL; gdCmp.verticalAlignment = SWT.FILL; gdCmp.grabExcessHorizontalSpace = true; gdCmp.grabExcessVerticalSpace = true; cmp.setLayoutData(gdCmp); cmp.setLayout(new GridLayout(1, false)); JPanel chartPanel = createDemoPanel(tipo); Frame graphFrame = SWT_AWT.new_Frame(cmp); graphFrame.add(chartPanel); graphFrame.pack(); GridData gdThis = new GridData(SWT.FILL); gdThis.horizontalAlignment = SWT.FILL; gdThis.verticalAlignment = SWT.FILL; gdThis.grabExcessHorizontalSpace = true; gdThis.grabExcessVerticalSpace = true; this.setLayoutData(gdThis); this.setLayout(new GridLayout(1, false)); }