Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (c) 2011-2013 Bernhard Pauler, Tim Molderez.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the 3-Clause BSD License
* which accompanies this distribution, and is available at
* http://www.opensource.org/licenses/BSD-3-Clause
*/
package net.java.balloontip.examples.complete.panels;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JColorChooser;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import net.java.balloontip.BalloonTip;
import net.java.balloontip.examples.complete.CompleteExample;
import net.java.balloontip.examples.complete.Utils;
import net.java.balloontip.positioners.BasicBalloonTipPositioner;
import net.java.balloontip.styles.EdgedBalloonStyle;
import net.java.balloontip.styles.IsometricBalloonStyle;
import net.java.balloontip.styles.MinimalBalloonStyle;
import net.java.balloontip.styles.ModernBalloonStyle;
import net.java.balloontip.styles.RoundedBalloonStyle;
import net.java.balloontip.styles.TexturedBalloonStyle;
import net.java.balloontip.styles.ToolTipBalloonStyle;
/**
* Looks tab of the demo application; lets you experiment with a balloon tip's looks
* @author Tim Molderez
*/
public class LooksTab extends JPanel {
private final BalloonTip balloonTip;
private final JComboBox> stylePicker;
private final JButton fillColorButton;
private final JButton borderColorButton;
private Color fillColor = Color.WHITE;
private Color borderColor = Color.BLUE;
/**
* Default constructor
*/
public LooksTab() {
super();
setLayout(new GridBagLayout());
int gridY = 0;
/*
* Draw the GUI
*/
// Description label
add(new JLabel("Toy around with these settings to change the balloon tip's looks."), new GridBagConstraints(0,gridY,2,1,1.0,0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(10,10,25,0), 0, 0));
++gridY;
// Contents textbox
add(new JLabel("Contents:"), new GridBagConstraints(0,gridY,1,1,0.0,0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,10,0,0), 0, 0));
final JTextField contents = new JTextField("I'm a balloon tip!");
Utils.setToolTip(contents, "The contents of a balloon tip may contain HTML formatting");
contents.setPreferredSize(new Dimension(250,25));
add(contents, new GridBagConstraints(1,gridY,1,1,0.0,0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2,10,2,0), 0, 0));
++gridY;
// Styles combobox
add(new JLabel("Style:"), new GridBagConstraints(0,gridY,1,1,0.0,0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,10,0,0), 0, 0));
String[] stylesOptions = {"Edged", "Isometric", "Minimal", "Modern", "Rounded", "Textured", "Tooltip"};
stylePicker = new JComboBox