List of usage examples for java.awt Label Label
public Label(String text) throws HeadlessException
From source file:LightTest.java
public void addUiToPanel(Panel panel) { m_XDirectionTextField = new TextField(3); m_YDirectionTextField = new TextField(3); m_ZDirectionTextField = new TextField(3); m_ConcentrationTextField = new TextField(3); m_SpreadAngleTextField = new TextField(3); panel.add(new Label("Direction:")); panel.add(new Label("X:")); panel.add(m_XDirectionTextField);/* w ww. ja va2 s .c o m*/ panel.add(new Label("Y:")); panel.add(m_YDirectionTextField); panel.add(new Label("Z:")); panel.add(m_ZDirectionTextField); panel.add(new Label("Concentration:")); panel.add(m_ConcentrationTextField); panel.add(new Label("Spread Angle:")); panel.add(m_SpreadAngleTextField); super.addUiToPanel(panel); }
From source file:LightTest.java
public void addUiToPanel(Panel panel) { panel.add(new Label("AmbientLight")); super.addUiToPanel(panel); }
From source file:LightTest.java
public void addUiToPanel(Panel panel) { m_XDirectionTextField = new TextField(3); m_YDirectionTextField = new TextField(3); m_ZDirectionTextField = new TextField(3); panel.add(new Label("Direction:")); panel.add(new Label("X:")); panel.add(m_XDirectionTextField);//from w w w . j a va 2s .c o m panel.add(new Label("Y:")); panel.add(m_YDirectionTextField); panel.add(new Label("Z:")); panel.add(m_ZDirectionTextField); super.addUiToPanel(panel); }
From source file:tracing.ShollAnalysisDialog.java
public ShollAnalysisDialog(String title, double x_start, double y_start, double z_start, PathAndFillManager pafm, ImagePlus originalImage) { super(IJ.getInstance(), title, false); this.x_start = x_start; this.y_start = y_start; this.z_start = z_start; this.originalImage = originalImage; twoDimensional = (originalImage.getStackSize() == 1); shollPointsAllPaths = new ArrayList<ShollPoint>(); shollPointsSelectedPaths = new ArrayList<ShollPoint>(); numberOfAllPaths = 0;/* ww w . j av a 2 s .c o m*/ numberOfSelectedPaths = 0; for (Path p : pafm.allPaths) { boolean selected = p.getSelected(); if (p.getUseFitted()) { p = p.fitted; } else if (p.fittedVersionOf != null) continue; addPathPointsToShollList(p, x_start, y_start, z_start, shollPointsAllPaths); ++numberOfAllPaths; if (selected) { addPathPointsToShollList(p, x_start, y_start, z_start, shollPointsSelectedPaths); ++numberOfSelectedPaths; } } useAllPathsCheckbox.setLabel("Use all " + numberOfAllPaths + " paths in analysis?"); useSelectedPathsCheckbox.setLabel("Use only the " + numberOfSelectedPaths + " selected paths in analysis?"); addWindowListener(this); setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.anchor = GridBagConstraints.LINE_START; int margin = 10; c.insets = new Insets(margin, margin, 0, margin); useAllPathsCheckbox.addItemListener(this); add(useAllPathsCheckbox, c); ++c.gridy; c.insets = new Insets(0, margin, margin, margin); add(useSelectedPathsCheckbox, c); useSelectedPathsCheckbox.addItemListener(this); ++c.gridy; c.insets = new Insets(margin, margin, 0, margin); add(normalAxes, c); normalAxes.addItemListener(this); ++c.gridy; c.insets = new Insets(0, margin, 0, margin); add(semiLogAxes, c); semiLogAxes.addItemListener(this); ++c.gridy; c.insets = new Insets(0, margin, margin, margin); add(logLogAxes, c); logLogAxes.addItemListener(this); ++c.gridy; c.insets = new Insets(margin, margin, 0, margin); add(noNormalization, c); noNormalization.addItemListener(this); ++c.gridy; c.insets = new Insets(0, margin, margin, margin); if (twoDimensional) normalizationForSphereVolume.setLabel("Normalize for area enclosed by circle"); else normalizationForSphereVolume.setLabel("Normalize for volume enclosed by circle"); add(normalizationForSphereVolume, c); normalizationForSphereVolume.addItemListener(this); ++c.gridy; c.gridx = 0; Panel separationPanel = new Panel(); separationPanel.add(new Label("Circle / sphere separation (0 for unsampled analysis)")); sampleSeparation.addTextListener(this); separationPanel.add(sampleSeparation); add(separationPanel, c); c.gridx = 0; ++c.gridy; c.insets = new Insets(margin, margin, margin, margin); add(resultsPanel, c); ++c.gridy; Panel buttonsPanel = new Panel(); buttonsPanel.setLayout(new BorderLayout()); Panel topRow = new Panel(); Panel middleRow = new Panel(); Panel bottomRow = new Panel(); topRow.add(makeShollImageButton); makeShollImageButton.addActionListener(this); topRow.add(drawShollGraphButton); drawShollGraphButton.addActionListener(this); middleRow.add(exportDetailAsCSVButton); exportDetailAsCSVButton.addActionListener(this); middleRow.add(exportSummaryAsCSVButton); exportSummaryAsCSVButton.addActionListener(this); bottomRow.add(addToResultsTableButton); addToResultsTableButton.addActionListener(this); buttonsPanel.add(topRow, BorderLayout.NORTH); buttonsPanel.add(middleRow, BorderLayout.CENTER); buttonsPanel.add(bottomRow, BorderLayout.SOUTH); add(buttonsPanel, c); pack(); GUI.center(this); setVisible(true); updateResults(); }
From source file:hpssim.grafica.HPSsim.java
public void setQueueXY(String hw) { XYSeriesCollection xyseriescollection = new XYSeriesCollection(); xyseriescollection.addSeries(datasetQueue); JFreeChart chart = ChartFactory.createXYLineChart("Queue Size - " + hw, "Tempo", "runq_sz", xyseriescollection, PlotOrientation.VERTICAL, true, true, false); XYPlot xyplot = (XYPlot) chart.getPlot(); xyplot.setBackgroundPaint(Color.white); xyplot.setAxisOffset(new RectangleInsets(5D, 5D, 5D, 5D)); panelGraficoFinestra.add("Center", new ChartPanel(chart)); panelGraficoFinestra.add("South", new Label("")); }
From source file:hpssim.grafica.HPSsim.java
private void setMeter() { datasetCPU = new DefaultValueDataset(0D); JFreeChart jfreechartCPU = createChart(datasetCPU, "CPU Usage"); datasetGPU = new DefaultValueDataset(0D); JFreeChart jfreechartGPU = createChart(datasetGPU, "GPU Usage"); panelCPU.add("Center", new ChartPanel(jfreechartCPU)); panelCPU.add("South", new Label("")); panelGPU.add("Center", new ChartPanel(jfreechartGPU)); panelGPU.add("South", new Label("")); datasetQueueCPU = new DefaultValueDataset(0D); datasetQueueGPU = new DefaultValueDataset(0D); ThermometerPlot gpuThermometerQueue = new ThermometerPlot(datasetQueueGPU); gpuThermometerQueue.setRange(0, 50); gpuThermometerQueue.setSubrange(ThermometerPlot.NORMAL, 0.0, 10.0); gpuThermometerQueue.setSubrange(ThermometerPlot.WARNING, 10.0, 25.0); gpuThermometerQueue.setSubrange(ThermometerPlot.CRITICAL, 25.0, 5000.0); gpuThermometerQueue.setUnits(ThermometerPlot.UNITS_NONE); gpuThermometerQueue.setBulbRadius(22); gpuThermometerQueue.setColumnRadius(20); ThermometerPlot cpuThermometerQueue = new ThermometerPlot(datasetQueueCPU); cpuThermometerQueue.setRange(0, 50); cpuThermometerQueue.setSubrange(ThermometerPlot.NORMAL, 0.0, 10.0); cpuThermometerQueue.setSubrange(ThermometerPlot.WARNING, 10.0, 25.0); cpuThermometerQueue.setSubrange(ThermometerPlot.CRITICAL, 25.0, 5000.0); cpuThermometerQueue.setUnits(ThermometerPlot.UNITS_NONE); cpuThermometerQueue.setBulbRadius(22); cpuThermometerQueue.setColumnRadius(20); panelCPUQueue.add("Center", new ChartPanel( new JFreeChart("CPU Queue", JFreeChart.DEFAULT_TITLE_FONT, cpuThermometerQueue, false))); panelCPUQueue.add("South", new Label("")); panelGPUQueue.add("Center", new ChartPanel( new JFreeChart("GPU Queue", JFreeChart.DEFAULT_TITLE_FONT, gpuThermometerQueue, false))); panelGPUQueue.add("South", new Label("")); }
From source file:org.opensc.test.pkcs11.PINEntry.java
/** * Contructs a PINEntry instance. //www. j a va2 s . c o m */ public PINEntry() { super(); Frame frame = new Frame("PIN entry"); frame.setLayout(new GridLayout(2, 2)); frame.add(new Label("Event:")); this.label = new Label("NO_EVENT"); frame.add(this.label); this.prompt = new Label(); frame.add(this.prompt); this.listener = new PINListener(frame); this.textField = new TextField(); this.textField.setEchoChar('*'); this.textField.addKeyListener(this.listener); frame.add(this.textField); frame.addWindowListener(this.listener); frame.pack(); frame.setVisible(true); GraphicsConfiguration gc = frame.getGraphicsConfiguration(); Rectangle r = gc.getBounds(); Point p = new Point((r.width - frame.getWidth()) / 2, (r.height - frame.getHeight()) / 2); frame.setLocation(p); }