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.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.event.AncestorEvent;
import javax.swing.event.AncestorListener;
import javax.swing.table.TableColumn;
import net.java.balloontip.TableCellBalloonTip;
import net.java.balloontip.examples.complete.Utils;
import net.java.balloontip.positioners.BasicBalloonTipPositioner;
import net.java.balloontip.positioners.LeftAbovePositioner;
import net.java.balloontip.positioners.LeftBelowPositioner;
import net.java.balloontip.positioners.RightAbovePositioner;
import net.java.balloontip.positioners.RightBelowPositioner;
/**
* Behaviour tab of the demo application; demonstrates different balloon tip positioners
* @author Tim Molderez
*/
public class BehaviourTab extends JPanel {
private final JComboBox> alignmentPicker;
private final JComboBox> attachPicker;
private final JCheckBox offsetCorrection;
private final JCheckBox orientationCorrection;
private final TableCellBalloonTip tableBalloon;
private final static int HOFFSET = 40;
private final static int VOFFSET = 20;
public BehaviourTab() {
super();
setLayout(new GridBagLayout());
int gridY = 0;
/*
* Draw the GUI
*/
// Description label
add(new JLabel("Scroll around the table and notice the balloon tip's behaviour when it collides with the window's border. You can alter this behaviour using the settings below."), new GridBagConstraints(0,gridY,2,1,1.0,0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(10,10,25,0), 0, 0));
++gridY;
// Orientation combobox
add(new JLabel("Orientation:"), new GridBagConstraints(0,gridY,1,1,0.0,0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,10,0,0), 0, 0));
String[] alignmentOptions = {"Left, above component", "Left, below component", "Right, above component", "Right, below component"};
alignmentPicker = new JComboBox