javax.swing.JTextArea#setEditable ( )源码实例Demo

下面列出了javax.swing.JTextArea#setEditable ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: software-demo   文件: RemarksPage.java
/**
 * Create the dialog.
 */
public RemarksPage(String remarks) {
	setBounds(100, 100, 450, 300);
	setModal(true);
	setLocationRelativeTo(null);
	getContentPane().setLayout(new BorderLayout());
	contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	getContentPane().add(contentPanel, BorderLayout.CENTER);
	contentPanel.setLayout(null);
	
	JLabel label = new JLabel("备注");
	label.setFont(new Font("宋体", Font.PLAIN, 18));
	label.setBounds(193, 10, 54, 15);
	contentPanel.add(label);
	
	JTextArea textArea = new JTextArea();
	textArea.setFont(new Font("Monospaced", Font.PLAIN, 17));
	textArea.setEditable(false);
	textArea.setEnabled(false);
	textArea.setText(remarks);
	JScrollPane scrollPane = new JScrollPane(textArea);
	scrollPane.setBounds(10, 37, 414, 214);
	contentPanel.add(scrollPane);
}
 
源代码2 项目: javamelody   文件: CounterRequestDetailPanel.java
private JPanel createStackTracePanel(String stackTrace) {
	final JTextArea textArea = new JTextArea();
	textArea.setFont(textArea.getFont().deriveFont((float) textArea.getFont().getSize() - 1));
	textArea.setEditable(false);
	textArea.setCaretPosition(0);
	// background nécessaire avec la plupart des look and feels dont Nimbus,
	// sinon il reste blanc malgré editable false
	textArea.setBackground(Color.decode("#E6E6E6"));
	textArea.setText(stackTrace);
	final JPanel panel = new JPanel(new BorderLayout());
	panel.setOpaque(false);
	final JLabel label = new JLabel("Stack-trace");
	label.setFont(label.getFont().deriveFont(Font.BOLD));
	panel.add(label, BorderLayout.NORTH);
	final JScrollPane scrollPane = new JScrollPane(textArea);
	panel.add(scrollPane, BorderLayout.CENTER);
	return panel;
}
 
源代码3 项目: HubPlayer   文件: ShowPanel.java
private void init() {
	libraryPanel = new LibraryPanel();

	// 歌词面板处理
	lrcPanel = new JPanel(new GridLayout());
	textArea = new JTextArea();

	// 文本域设置不可编辑、透明、左间距、自动换行
	textArea.setEditable(false);
	textArea.setLineWrap(true);
	textArea.setMargin(new Insets(0, 175, 0, 0));
	textArea.setOpaque(false);

	textArea.setFont(new Font("PLAN", Font.PLAIN, 14));
	lrcPanel.add(textArea);

	// 其他面板
	MVPanel = new JScrollPane(new JLabel("MV"));
	radioPanel = new JScrollPane(new JLabel("电台"));
	livePanel = new JScrollPane(new JLabel("直播"));
}
 
源代码4 项目: jmeter-plugins   文件: PerfMonGui.java
@Override
protected JPanel getGraphPanelContainer() {
    JPanel panel = new JPanel(new BorderLayout());
    JPanel innerTopPanel = new JPanel(new BorderLayout());

    errorPane = new JScrollPane();
    errorPane.setMinimumSize(new Dimension(100, 50));
    errorPane.setPreferredSize(new Dimension(100, 50));

    errorTextArea = new JTextArea();
    errorTextArea.setForeground(Color.red);
    errorTextArea.setBackground(new Color(255, 255, 153));
    errorTextArea.setEditable(false);
    errorPane.setViewportView(errorTextArea);

    registerPopup();

    innerTopPanel.add(createConnectionsPanel(), BorderLayout.NORTH);
    innerTopPanel.add(errorPane, BorderLayout.SOUTH);
    innerTopPanel.add(getFilePanel(), BorderLayout.CENTER);

    panel.add(innerTopPanel, BorderLayout.NORTH);

    errorPane.setVisible(false);

    return panel;
}
 
源代码5 项目: jdk8u60   文件: TextViewOOM.java
private static void createAndShowGUI() {
    frame = new JFrame();
    final JScrollPane jScrollPane1 = new JScrollPane();
    ta = new JTextArea();

    ta.setEditable(false);
    ta.setColumns(20);
    ta.setRows(5);
    jScrollPane1.setViewportView(ta);
    frame.add(ta);

    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
源代码6 项目: openjdk-jdk8u-backup   文件: ImageableAreaTest.java
private static void createAndShowTestDialog(String description,
        String failMessage, Runnable action) {
    final JDialog dialog = new JDialog();
    dialog.setTitle("Test: " + (++testCount));
    dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
    JTextArea textArea = new JTextArea(description);
    textArea.setEditable(false);
    final JButton testButton = new JButton("Print Table");
    final JButton passButton = new JButton("PASS");
    passButton.setEnabled(false);
    passButton.addActionListener((e) -> {
        dialog.dispose();
    });
    final JButton failButton = new JButton("FAIL");
    failButton.setEnabled(false);
    failButton.addActionListener((e) -> {
        throw new RuntimeException(failMessage);
    });
    testButton.addActionListener((e) -> {
        testButton.setEnabled(false);
        action.run();
        passButton.setEnabled(true);
        failButton.setEnabled(true);
    });
    JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(textArea, BorderLayout.CENTER);
    JPanel buttonPanel = new JPanel(new FlowLayout());
    buttonPanel.add(testButton);
    buttonPanel.add(passButton);
    buttonPanel.add(failButton);
    mainPanel.add(buttonPanel, BorderLayout.SOUTH);
    dialog.add(mainPanel);
    dialog.pack();
    dialog.setVisible(true);
}
 
源代码7 项目: rapidminer-studio   文件: BetaFeaturesListener.java
@Override
public void windowClosed(WindowEvent e) {
	boolean betaActiveNow = Boolean
			.parseBoolean(ParameterService.getParameterValue(RapidMiner.PROPERTY_RAPIDMINER_UPDATE_BETA_FEATURES));
	if (!betaActiveBefore && betaActiveNow) {
		JTextArea textArea = new JTextArea();
		textArea.setColumns(60);
		textArea.setRows(15);
		textArea.setLineWrap(true);
		textArea.setWrapStyleWord(true);
		textArea.setEditable(false);
		textArea.setText(loadBetaEULA());
		textArea.setBorder(null);
		textArea.setCaretPosition(0);

		JScrollPane scrollPane = new ExtendedJScrollPane(textArea);
		scrollPane.setBorder(BorderFactory.createLineBorder(Colors.TEXTFIELD_BORDER));

		ButtonDialog dialog = new ButtonDialogBuilder("beta_features_eula")
				.setOwner(ApplicationFrame.getApplicationFrame())
				.setButtons(DefaultButtons.OK_BUTTON, DefaultButtons.CANCEL_BUTTON)
				.setModalityType(ModalityType.APPLICATION_MODAL).setContent(scrollPane, ButtonDialog.DEFAULT_SIZE)
				.build();
		dialog.setVisible(true);
		if (!dialog.wasConfirmed()) {
			ParameterService.setParameterValue(RapidMiner.PROPERTY_RAPIDMINER_UPDATE_BETA_FEATURES,
					String.valueOf(false));
			ParameterService.saveParameters();
			ActionStatisticsCollector.INSTANCE.log(ActionStatisticsCollector.TYPE_BETA_FEATURES,
					ActionStatisticsCollector.VALUE_BETA_FEATURES_ACTIVATION, "cancelled");
		}
	}
}
 
源代码8 项目: marathonv5   文件: PopupMenuDemo.java
public Container createContentPane() {
    // Create the content-pane-to-be.
    JPanel contentPane = new JPanel(new BorderLayout());
    contentPane.setOpaque(true);

    // Create a scrolled text area.
    output = new JTextArea(5, 30);
    output.setEditable(false);
    scrollPane = new JScrollPane(output);

    // Add the text area to the content pane.
    contentPane.add(scrollPane, BorderLayout.CENTER);

    return contentPane;
}
 
源代码9 项目: netbeans   文件: GroovyJUnitTestWizard.java
private JTextComponent createMultilineLabel(String text) {
    JTextArea textArea = new JTextArea(text);
    textArea.setEditable(false);
    textArea.setLineWrap(true);
    textArea.setWrapStyleWord(true);
    textArea.setEnabled(false);
    textArea.setOpaque(false);
    textArea.setColumns(25);
    textArea.setDisabledTextColor(new JLabel().getForeground());

    return textArea;
}
 
源代码10 项目: jdk8u_jdk   文件: TextViewOOM.java
private static void createAndShowGUI() {
    frame = new JFrame();
    final JScrollPane jScrollPane1 = new JScrollPane();
    ta = new JTextArea();

    ta.setEditable(false);
    ta.setColumns(20);
    ta.setRows(5);
    jScrollPane1.setViewportView(ta);
    frame.add(ta);

    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
源代码11 项目: javagame   文件: InfoPanel.java
public InfoPanel() {
    // �p�l���̐����T�C�Y��ݒ�Apack()����Ƃ��ɕK�v
    setPreferredSize(new Dimension(320, 240));
    
    setLayout(new BorderLayout());
    infoArea = new JTextArea();
    infoArea.setEditable(true);
    infoArea.setLineWrap(true);

    add(new JScrollPane(infoArea), BorderLayout.CENTER);
}
 
源代码12 项目: marathonv5   文件: PopupMenuDemoX.java
public Container createContentPane() {
    // Create the content-pane-to-be.
    JPanel contentPane = new JPanel(new BorderLayout());
    contentPane.setOpaque(true);

    // Create a scrolled text area.
    output = new JTextArea(5, 30);
    output.setEditable(false);
    scrollPane = new JScrollPane(output);

    // Add the text area to the content pane.
    contentPane.add(scrollPane, BorderLayout.CENTER);

    return contentPane;
}
 
源代码13 项目: ET_Redux   文件: AbstractDataMonitorView.java
private void rawDataFilePathTextFactory() throws IOException {
    // show rawdatafile path
    rawDataFilePathTextArea = new JTextArea(//
            "Monitoring Raw data location: "
            + rawDataFileHandler.getAcquisitionModel().getRawDataFile().getCanonicalPath());

    rawDataFilePathTextArea.setBounds(leftMargin + 50, topMargin, parentDimension.width - 100, 40);
    rawDataFilePathTextArea.setLineWrap(true);
    rawDataFilePathTextArea.setEditable(false);
    rawDataFilePathTextArea.setForeground(Color.RED);
    this.add(rawDataFilePathTextArea, JLayeredPane.DEFAULT_LAYER);
}
 
源代码14 项目: TencentKona-8   文件: ImageableAreaTest.java
private static void createAndShowTestDialog(String description,
        String failMessage, Runnable action) {
    final JDialog dialog = new JDialog();
    dialog.setTitle("Test: " + (++testCount));
    dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
    JTextArea textArea = new JTextArea(description);
    textArea.setEditable(false);
    final JButton testButton = new JButton("Print Table");
    final JButton passButton = new JButton("PASS");
    passButton.setEnabled(false);
    passButton.addActionListener((e) -> {
        dialog.dispose();
    });
    final JButton failButton = new JButton("FAIL");
    failButton.setEnabled(false);
    failButton.addActionListener((e) -> {
        throw new RuntimeException(failMessage);
    });
    testButton.addActionListener((e) -> {
        testButton.setEnabled(false);
        action.run();
        passButton.setEnabled(true);
        failButton.setEnabled(true);
    });
    JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(textArea, BorderLayout.CENTER);
    JPanel buttonPanel = new JPanel(new FlowLayout());
    buttonPanel.add(testButton);
    buttonPanel.add(passButton);
    buttonPanel.add(failButton);
    mainPanel.add(buttonPanel, BorderLayout.SOUTH);
    dialog.add(mainPanel);
    dialog.pack();
    dialog.setVisible(true);
}
 
源代码15 项目: netbeans   文件: DesignSupport.java
static JComponent warningPanel() throws MissingResourceException {
    JTextArea a = new JTextArea();
    a.setEditable(false);
    a.setText(org.openide.util.NbBundle.getMessage(BasicSettingsPanel.class, "MSG_ReallyLaunch", new Object[]{}));
    a.setOpaque(false);
    return a;
}
 
源代码16 项目: jpexs-decompiler   文件: Amf3ValueEditor.java
public Amf3ValueEditor(String fieldName, Object obj, Field field, int index, Class<?> type) {
    this.obj = obj;
    this.field = field;
    this.index = index;
    this.type = type;
    this.fieldName = fieldName;
    setPreferredSize(new Dimension(800, 200));
    setLayout(new BorderLayout());

    JPanel titlePanel = new JPanel(new BorderLayout()) {
        @Override
        public Insets getInsets() {
            Insets is = super.getInsets();
            is.left = 5;
            return is;
        }

    };
    JLabel titleLabel = new JLabel(AppStrings.translate("generic.editor.amf3.title"));
    titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD));
    titlePanel.add(titleLabel, BorderLayout.CENTER);
    JButton helpButton = new JButton(View.getIcon("about16"));
    helpButton.setFocusable(false);
    JTextArea txthelp = new JTextArea();
    txthelp.setFont(new Font("monospaced", Font.PLAIN, 12));

    final String SCALAR_SAMPLES = " * undefined, null, false, true\n"
            + " * integer : -5, 5, 29\n"
            + " * double: 5.5, 1.27, -187.568\n"
            + " * String: \"hello\", \"escape new\\nline\"\n";
    final String NONSCALAR_SAMPLES = " * XMLDocument: {\"type\":\"XMLDocument\", value: \"<foo></foo>\"}\n"
            + " * Date: {\"type\":\"Date\", \"value\": \"2016-07-17 14:51:42.584\"}\n"
            + " * Array: {\"type\":\"Array\", \"denseValues\": [27,58,99], \"associativeValues\": {\"key1\":5, \"key2\": -4.6 }}\n"
            + " * Object: {\"type\":\"Object\",\"className\":\"\",\"dynamic\":true,\n"
            + "            \"sealedMembers\": {\"smemberA\": \"abc\", \"smemberB\":987.5},\n"
            + "            \"dynamicMembers\": {\"member1\": 5, \"member2\": \"aaa\"}\n"
            + "            }\n"
            + " * XML: {\"type\":\"XML\", value: \"<foo></foo>\"}\n"
            + " * ByteArray: {\"type\":\"ByteArray\", \"value\":\"B0312F\"}\n"
            + " * Vector: {\"type\": \"Vector\", \"fixed\":false, \"subtype\":\"int\", \"values\": [8, 4, 6]}\n"
            + " * Dictionary: {\"type\": \"Dictionary\", \"weakKeys\":false, \"entries\": { \"dkey1\" : \"val1\", \"dkey2\": 56 }}\n";
    final String REFERENCE_SAMPLE = "  {\"type\": \"Vector\", \"fixed\":false, \"subtype\":\"\",\n"
            + "   \"values\": [\n"
            + "       {\"type\":\"Date\", id=\"mydate\",\"value\": \"2016-07-17 14:51:42.584\"}\n"
            + "       #mydate,\n"
            + "       #mydate,\n"
            + "       {\"type\":\"Date\", \"value\": \"2016-07-26 18:12:22.188\"}\n"
            + "    ]}";

    txthelp.setText(AppStrings.translate("generic.editor.amf3.help").replace("%scalar_samples%", SCALAR_SAMPLES).replace("%nonscalar_samples%", NONSCALAR_SAMPLES).replace("%reference_sample%", REFERENCE_SAMPLE));
    txthelp.setEditable(false);
    helpButton.addActionListener((ActionEvent e) -> {
        View.showMessageDialog(null, txthelp);
    });
    titlePanel.add(helpButton, BorderLayout.EAST);
    add(titlePanel, BorderLayout.NORTH);

    add(new JScrollPane(editor), BorderLayout.CENTER);
    add(errorLabel, BorderLayout.SOUTH);
    errorLabel.setBackground(Color.red);
    errorLabel.setForeground(Color.white);
    errorLabel.setOpaque(true);

    reset();
}
 
源代码17 项目: iBioSim   文件: LHPNEditor.java
public void viewLhpn() {
	try {
		File work = new File(directory);
		if (new File(directory + File.separator + filename).exists()) {
			String dotFile = filename.replace(".lpn", ".dot");
			File dot = new File(directory + File.separator + dotFile);
			dot.delete();
			Preferences biosimrc = Preferences.userRoot();
			String command = biosimrc.get("biosim.general.graphviz", "");
			command = command + " " + dotFile;
			Runtime exec = Runtime.getRuntime();
			lhpnFile.printDot(directory + File.separator + dotFile);
			if (dot.exists()) {
				exec.exec(command, null, work);
			} else {
				File log = new File(directory + File.separator + "atacs.log");
				BufferedReader input = new BufferedReader(new FileReader(
						log));
				String line = null;
				JTextArea messageArea = new JTextArea();
				while ((line = input.readLine()) != null) {
					messageArea.append(line);
					messageArea
							.append(System.getProperty("line.separator"));
				}
				input.close();
				messageArea.setLineWrap(true);
				messageArea.setWrapStyleWord(true);
				messageArea.setEditable(false);
				JScrollPane scrolls = new JScrollPane();
				scrolls.setMinimumSize(new Dimension(500, 500));
				scrolls.setPreferredSize(new Dimension(500, 500));
				scrolls.setViewportView(messageArea);
				JOptionPane.showMessageDialog(Gui.frame, scrolls, "Log",
						JOptionPane.INFORMATION_MESSAGE);
			}
		} else {
			JOptionPane.showMessageDialog(this,
					"No circuit has been generated yet.", "Error",
					JOptionPane.ERROR_MESSAGE);
		}
	} catch (Exception e1) {
		e1.printStackTrace();
		JOptionPane.showMessageDialog(this, "Unable to view circuit.",
				"Error", JOptionPane.ERROR_MESSAGE);
	}
}
 
源代码18 项目: jdk8u_jdk   文件: TestSaveFileWithoutPrinter.java
private static void createAndShowTestDialog() {
    String description =
        " To run this test it is required to delete any installed printers.\r\n" +
        "\r\n" +
        " 1. Verify that saving file via \"Save as PDF\" results in saving file\r\n" +
        " even if there is no installed printer.\r\n" +
        " 2. Click on \"Start Test\" button.\r\n" +
        " 3. In the shown print dialog select \"Save as PDF\" in PDF drop-down list\r\n" +
        " 4. Another dialog opens prompting for filename, enter any filename and press \"Save\".\r\n" +
        "\r\n" +
        " If the file is saved without any PrinterException, click on \"PASS\"\r\n" +
        " button, otherwise click on \"FAIL\" button.";

    final JDialog dialog = new JDialog();
    dialog.setTitle("SaveFileWithoutPrinter");
    dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    dialog.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            dialog.dispose();
            fail("Main dialog was closed.");
        }
    });

    final JLabel testTimeoutLabel = new JLabel(String.format(
        "Test timeout: %s", convertMillisToTimeStr(testTimeout)));
    final long startTime = System.currentTimeMillis();
    final Timer timer = new Timer(0, null);
    timer.setDelay(1000);
    timer.addActionListener((e) -> {
        int leftTime = testTimeout - (int) (System.currentTimeMillis() - startTime);
        if ((leftTime < 0) || testFinished) {
            timer.stop();
            dialog.dispose();
        }
        testTimeoutLabel.setText(String.format(
            "Test timeout: %s", convertMillisToTimeStr(leftTime)));
    });
    timer.start();

    JTextArea textArea = new JTextArea(description);
    textArea.setEditable(false);

    final JButton testButton = new JButton("Start Test");
    final JButton passButton = new JButton("PASS");
    final JButton failButton = new JButton("FAIL");
    testButton.addActionListener((e) -> {
        testButton.setEnabled(false);
        new Thread(() -> {
            try {
                doTest();

                SwingUtilities.invokeLater(() -> {
                    passButton.setEnabled(true);
                    failButton.setEnabled(true);
                });
            } catch (Throwable t) {
                t.printStackTrace();
                dialog.dispose();
                fail("Exception occurred in a thread executing the test.");
            }
        }).start();
    });
    passButton.setEnabled(false);
    passButton.addActionListener((e) -> {
        dialog.dispose();
        pass();
    });
    failButton.setEnabled(false);
    failButton.addActionListener((e) -> {
        dialog.dispose();
        fail("PrinterException thrown.");
    });

    JPanel mainPanel = new JPanel(new BorderLayout());
    JPanel labelPanel = new JPanel(new FlowLayout());
    labelPanel.add(testTimeoutLabel);
    mainPanel.add(labelPanel, BorderLayout.NORTH);
    mainPanel.add(textArea, BorderLayout.CENTER);
    JPanel buttonPanel = new JPanel(new FlowLayout());
    buttonPanel.add(testButton);
    buttonPanel.add(passButton);
    buttonPanel.add(failButton);
    mainPanel.add(buttonPanel, BorderLayout.SOUTH);
    dialog.add(mainPanel);

    dialog.pack();
    dialog.setVisible(true);
}
 
源代码19 项目: snap-desktop   文件: InsertWktGeometryAction.java
@Override
public void actionPerformed(ActionEvent event) {
    JTextArea textArea = new JTextArea(16, 32);
    textArea.setEditable(true);

    JPanel contentPanel = new JPanel(new BorderLayout(4, 4));
    contentPanel.add(new JLabel("Geometry Well-Known-Text (WKT):"), BorderLayout.NORTH);
    contentPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);

    SnapApp snapApp = SnapApp.getDefault();
    ModalDialog modalDialog = new ModalDialog(snapApp.getMainFrame(),
                                              Bundle.CTL_InsertWktGeometryAction_DialogTitle(),
                                              ModalDialog.ID_OK_CANCEL, null);
    modalDialog.setContent(contentPanel);
    modalDialog.center();
    if (modalDialog.show() == ModalDialog.ID_OK) {
        String wellKnownText = textArea.getText();
        if (wellKnownText == null || wellKnownText.isEmpty()) {
            return;
        }
        ProductSceneView sceneView = snapApp.getSelectedProductSceneView();
        VectorDataLayer vectorDataLayer = InsertFigureInteractorInterceptor.getActiveVectorDataLayer(sceneView);
        if (vectorDataLayer == null) {
            return;
        }

        SimpleFeatureType wktFeatureType = PlainFeatureFactory.createDefaultFeatureType(DefaultGeographicCRS.WGS84);
        ListFeatureCollection newCollection = new ListFeatureCollection(wktFeatureType);
        SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(wktFeatureType);
        SimpleFeature wktFeature = featureBuilder.buildFeature("ID" + Long.toHexString(currentFeatureId++));
        Geometry geometry;
        try {
            geometry = new WKTReader().read(wellKnownText);
        } catch (ParseException e) {
            snapApp.handleError("Failed to convert WKT into geometry", e);
            return;
        }
        wktFeature.setDefaultGeometry(geometry);
        newCollection.add(wktFeature);

        FeatureCollection<SimpleFeatureType, SimpleFeature> productFeatures = FeatureUtils.clipFeatureCollectionToProductBounds(
                newCollection,
                sceneView.getProduct(),
                null,
                ProgressMonitor.NULL);
        if (productFeatures.isEmpty()) {
            Dialogs.showError(Bundle.CTL_InsertWktGeometryAction_MenuText(),
                              "The geometry is not contained in the product.");
        } else {
            vectorDataLayer.getVectorDataNode().getFeatureCollection().addAll(productFeatures);
        }
    }
}
 
源代码20 项目: raccoon4   文件: TransferViewBuilder.java
@Override
protected JPanel assemble() {
	peers = new Vector<TransferPeerBuilder>();
	GridBagConstraints spacerConstraints = new GridBagConstraints();
	spacerConstraints.gridx = GridBagConstraints.REMAINDER;
	spacerConstraints.gridy = GridBagConstraints.RELATIVE;
	spacerConstraints.weightx = 1;
	spacerConstraints.weighty = 1;
	spacerConstraints.fill = GridBagConstraints.BOTH;

	list = new JPanel();
	list.setLayout(new GridBagLayout());
	contentConstraints = new GridBagConstraints();
	contentConstraints.gridx = GridBagConstraints.REMAINDER;
	contentConstraints.gridy = GridBagConstraints.RELATIVE;
	contentConstraints.fill = GridBagConstraints.HORIZONTAL;
	contentConstraints.anchor = GridBagConstraints.NORTH;
	contentConstraints.insets.bottom = 3;

	ActionLocalizer al = Messages.getLocalizer();
	trim = new JButton(al.localize("trimdownloads"));
	trim.addActionListener(this);
	list.add(new JPanel(), spacerConstraints);
	
	
	JPanel cont = new JPanel();
	cont.setLayout(new GridBagLayout());
	GridBagConstraints contgbc = new GridBagConstraints();
	if (!globals.get(Traits.class).isAvailable("4.0.x")) {
		JTextArea txt = new JTextArea(Messages.getString(ID + ".booster.plug"));
		txt.setLineWrap(true);
		txt.setWrapStyleWord(true);
		txt.setPreferredSize(new Dimension(ITEMWIDTH + 2 * 10,50));
		txt.setEditable(false);
		txt.setBackground(null);
		txt.setForeground(Color.RED);
		cont.add(txt,contgbc);
		contgbc.gridx=0;
		contgbc.gridy =1;
		contgbc.insets = new Insets(5,5,5,5);
		contgbc.anchor=GridBagConstraints.NORTHEAST;
		order=new JButton(Messages.getString(ID + ".booster.ok"));
		order.addActionListener(this);
		cont.add(order,contgbc);
		contgbc.gridy=2;
		contgbc.gridx=0;
	}

	JScrollPane tmp = new JScrollPane(list);
	tmp.setBorder(BorderFactory.createEmptyBorder());
	tmp.getVerticalScrollBar().setUnitIncrement(20);
	tmp.setPreferredSize(new Dimension(ITEMWIDTH + 2 * 10, 400));
	tmp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	
	contgbc.weightx=1;
	contgbc.weighty=1;
	cont.add(tmp,contgbc);

	JPanel ret = new DialogBuilder(cont)
			.withTitle(Messages.getString(ID + ".title"))
			.withSubTitle(Messages.getString(ID + ".subtitle"))
			.withButtons(new ButtonBarBuilder().add(trim)).build(globals);

	globals.get(TransferManager.class).setPeer(this);
	return ret;
}