List of usage examples for java.awt Insets Insets
public Insets(int top, int left, int bottom, int right)
From source file:JToolbarButton.java
/** * Initializes the button.//from ww w .j av a 2 s.c o m */ protected void initialize() { if (!System.getProperty("java.version").startsWith("1.3")) { setOpaque(false); setBackground(new java.awt.Color(0, 0, 0, 0)); } setBorderPainted(false); setMargin(new Insets(2, 2, 2, 2)); addMouseListener(new MouseListener()); }
From source file:JToolbarToggleButton.java
/** * Initializes the button.// w ww.ja va 2s .c o m */ protected void initialize() { if (!System.getProperty("java.version").startsWith("1.3")) { setOpaque(false); setBackground(new java.awt.Color(0, 0, 0, 0)); } setBorderPainted(false); setMargin(new Insets(2, 2, 2, 2)); // Windows XP look and feel seems to have a bug due to which the // size of the parent container changes when the border painted // property is set. Temporary fix: disable mouseover behavior if // installed lnf is Windows XP if (!UIManager.getLookAndFeel().getName().equals("Windows")) { addMouseListener(new MouseListener()); } }
From source file:org.quickserver.net.qsadmin.plugin.stats.MeterChart.java
public MeterChart(String title) { data = new DefaultValueDataset(0.0); meterplot = new MeterPlot(data); range = new Range(0, 20000); bgColor = new Color(238, 238, 230, 255); meterplot.setRange(range);/* w w w . j av a2 s .com*/ meterplot.setNormalRange(new Range(0, 4000)); meterplot.setWarningRange(new Range(4000, 9000)); meterplot.setCriticalRange(new Range(9000, 20000)); meterplot.setUnits(""); meterplot.setDrawBorder(false); meterplot.setInsets(new Insets(2, 2, 2, 2)); meterchart = new JFreeChart(title + " Meter", JFreeChart.DEFAULT_TITLE_FONT, meterplot, false); meterchart.setBackgroundPaint(bgColor); panelMeter = new ChartPanel(meterchart); setLayout(new BorderLayout()); add(panelMeter, BorderLayout.CENTER); }
From source file:bazaar4idea.ui.BzrGlobalStatusDialog.java
/** Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< * DO NOT edit this method OR call it in your code! * @noinspection ALL/*w w w. j av a 2 s .co m*/ */ private void $$$setupUI$$$() { contentPanel = new JPanel(); contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); final JScrollPane scrollPane1 = new JScrollPane(); contentPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, new Dimension(300, 350), null, null, 0, false)); outputTextArea = new JTextArea(); outputTextArea.setEditable(false); scrollPane1.setViewportView(outputTextArea); }
From source file:MainClass.java
public Insets getBorderInsets(Component c) { return new Insets(sinkLevel, sinkLevel, sinkLevel, sinkLevel); }
From source file:guineu.modules.visualization.intensityplot.IntensityPlotToolBar.java
IntensityPlotToolBar(IntensityPlotFrame frame) { super(JToolBar.VERTICAL); setFloatable(false);//from w w w. j av a2 s . c o m setMargin(new Insets(5, 5, 5, 5)); setBackground(Color.white); this.frame = frame; linesVisibleButton = GUIUtils.addButton(this, null, linesIcon, this, null, "Switch lines on/off"); if (frame.getChart().getPlot() instanceof XYPlot) { addSeparator(); setupAxesButton = GUIUtils.addButton(this, null, axesIcon, this, "SETUP_AXES", "Setup ranges for axes"); } }
From source file:guineu.modules.visualization.intensityboxplot.IntensityBoxPlotToolBar.java
IntensityBoxPlotToolBar(IntensityBoxPlotFrame frame) { super(JToolBar.VERTICAL); setFloatable(false);// w w w . jav a 2 s. co m setMargin(new Insets(5, 5, 5, 5)); setBackground(Color.white); this.frame = frame; linesVisibleButton = GUIUtils.addButton(this, null, linesIcon, this, null, "Switch lines on/off"); if (frame.getChart().getPlot() instanceof XYPlot) { addSeparator(); setupAxesButton = GUIUtils.addButton(this, null, axesIcon, this, "SETUP_AXES", "Setup ranges for axes"); } }
From source file:QandE.StripeBorder.java
public Insets getBorderInsets(Component c) { return new Insets(HEIGHT, 0, 0, 0); }
From source file:JWSFileChooserDemo.java
public JWSFileChooserDemo() { super(new BorderLayout()); //Create the log first, because the action listeners //need to refer to it. log = new JTextArea(5, 20); log.setMargin(new Insets(5, 5, 5, 5)); log.setEditable(false);// w w w . ja v a 2 s . c o m JScrollPane logScrollPane = new JScrollPane(log); //Create the open button. We use the image from the JLF //Graphics Repository (but we extracted it from the jar). openButton = new JButton("Open a File...", createImageIcon("images/Open16.gif")); openButton.addActionListener(this); //Create the save button. We use the image from the JLF //Graphics Repository (but we extracted it from the jar). saveButton = new JButton("Save a File...", createImageIcon("images/Save16.gif")); //PENDING: removed the Save button action listener //so that people won't overwrite existing files. //See bug 4761577. //saveButton.addActionListener(this); saveButton.setEnabled(false); //For layout purposes, put the buttons in a separate panel JPanel buttonPanel = new JPanel(); buttonPanel.add(openButton); buttonPanel.add(saveButton); //Add the buttons and the log to this panel. add(buttonPanel, BorderLayout.PAGE_START); add(logScrollPane, BorderLayout.CENTER); }
From source file:com.sec.ose.osi.ui.dialog.about.JPanAbout.java
public JTextArea getJTextAreaAbout() { if (jTextAreaAbout == null) { jTextAreaAbout = new JTextArea(); jTextAreaAbout.setEditable(false); jTextAreaAbout.setLineWrap(true); jTextAreaAbout.setMargin(new Insets(15, 15, 15, 15)); jTextAreaAbout.setText(getLicenseText()); }// w w w . j av a2s . c o m return jTextAreaAbout; }