Java Code Examples for javax.swing.border.TitledBorder#LEADING

The following examples show how to use javax.swing.border.TitledBorder#LEADING . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TitledBorderBeanInfo.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public JustificationPropertyEditor() {
    super(
        new int[] {
            TitledBorder.DEFAULT_JUSTIFICATION,
            TitledBorder.LEFT,
            TitledBorder.CENTER,
            TitledBorder.RIGHT,
            TitledBorder.LEADING,
            TitledBorder.TRAILING,
        },
        new String[] {
            "javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION", // NOI18N
            "javax.swing.border.TitledBorder.LEFT", // NOI18N
            "javax.swing.border.TitledBorder.CENTER", // NOI18N
            "javax.swing.border.TitledBorder.RIGHT", // NOI18N
            "javax.swing.border.TitledBorder.LEADING", // NOI18N
            "javax.swing.border.TitledBorder.TRAILING", // NOI18N
        },
        new String[] {
            "VALUE_JustDefault", // NOI18N
            "VALUE_JustLeft", // NOI18N
            "VALUE_JustCenter", // NOI18N
            "VALUE_JustRight", // NOI18N
            "VALUE_JustLeading", // NOI18N
            "VALUE_JustTrailing", // NOI18N
        }
    );
}
 
Example 2
Source File: FcdProPlusPanel.java    From FoxTelem with GNU General Public License v3.0 5 votes vote down vote up
public FcdProPlusPanel() throws IOException {
	TitledBorder title = new TitledBorder(null, "Funcube Dongle Pro Plus", TitledBorder.LEADING, TitledBorder.TOP, null, null);
	//title.setTitleFont(new Font("SansSerif", Font.PLAIN, 12));
	this.setBorder(title);
	try {
		initializeGui();
	} catch (DeviceException e) {
		// Don't stop the GUI thread, just report the error
		Log.println("ERROR setting the inital settings for the FCD");
		e.printStackTrace(Log.getWriter());
	}
}
 
Example 3
Source File: OptionsPanel.java    From FoxTelem with GNU General Public License v3.0 5 votes vote down vote up
OptionsPanel() {
	//decoder = d;
	TitledBorder title = new TitledBorder(null, "Debug Options", TitledBorder.LEADING, TitledBorder.TOP, null, null);
	title.setTitleFont(new Font("SansSerif", Font.BOLD, 14));
	this.setBorder(title);
	initializeGui();
}
 
Example 4
Source File: RTLPanel.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
public RTLPanel() throws IOException, DeviceException {
	TitledBorder title = new TitledBorder(null, "RTL USB SDR", TitledBorder.LEADING, TitledBorder.TOP, null, null);
	//title.setTitleFont(new Font("SansSerif", Font.PLAIN, 12));
	this.setBorder(title);
}
 
Example 5
Source File: FcdProPanel.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
public FcdProPanel() throws IOException, DeviceException {
	TitledBorder title = new TitledBorder(null, "Funcube Dongle Pro", TitledBorder.LEADING, TitledBorder.TOP, null, null);
	//title.setTitleFont(new Font("SansSerif", Font.PLAIN, 12));
	this.setBorder(title);
	initializeGui();
}
 
Example 6
Source File: AirspyPanel.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
public AirspyPanel() throws IOException, DeviceException {
	TitledBorder title = new TitledBorder(null, "Airspy", TitledBorder.LEADING, TitledBorder.TOP, null, null);
	//title.setTitleFont(new Font("SansSerif", Font.PLAIN, 12));
	this.setBorder(title);
}
 
Example 7
Source File: DisplayModule.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Create a new module and set the title.  Initialize the name and value arrays.
 * Create the GUI
 * 
 * @param title
 * @param size
 */
public DisplayModule(FoxSpacecraft fox2, String title, int size, int modType) {
	fox = fox2;
	foxId = fox.foxId;
	this.size = size;
	this.title = title;
	TitledBorder border = new TitledBorder(null, title, TitledBorder.LEADING, TitledBorder.TOP, null, null);
	scale = (double)(Config.displayModuleFontSize)/(double)(DEFAULT_FONT_SIZE);	
	//Log.println("SCALE: " + scale + " font:" +Config.displayModuleFontSize + " def: " + DEFAULT_FONT_SIZE);
	setDefaultSizes();
	moduleType = modType;
			
	if (moduleType == DISPLAY_HERCI || moduleType == DISPLAY_HERCI_HK || moduleType == DISPLAY_HERCI_MICRO_PKT) {
		border.setTitleFont(new Font("SansSerif", Font.BOLD, (int)(Config.displayModuleFontSize * 12/11)));
		border.setTitleColor(herciFontColor);
	} else if (moduleType == DISPLAY_MEASURES) {
		border.setTitleFont(new Font("SansSerif", Font.BOLD, (int)(Config.displayModuleFontSize * 12/10)));
		border.setTitleColor(vulcanFontColor);
		minValue = new JButton[size];
	} else if (moduleType >= DISPLAY_WOD) {
		border.setTitleFont(new Font("SansSerif", Font.BOLD, (int)(Config.displayModuleFontSize * 12/10)));
		border.setTitleColor(wodFontColor);
		minValue = new JButton[size];
	} else if (moduleType >= DISPLAY_VULCAN) {
		border.setTitleFont(new Font("SansSerif", Font.BOLD, (int)(Config.displayModuleFontSize * 12/10)));
		border.setTitleColor(vulcanFontColor);
	} else {
		border.setTitleFont(new Font("SansSerif", Font.BOLD, (int)(Config.displayModuleFontSize * 12/11)));	
		border.setTitleColor(Color.BLUE);
		maxValue = new JLabel[size];
		minValue = new JLabel[size];

	}
	this.setBorder(border);
	
	fieldName = new String[size]; 
	rtValue = new JLabel[size];
	label = new JLabel[size];
	row = new JPanel[size];
	graph = new GraphFrame[GraphFrame.MAX_PLOT_TYPES][size];
	display = new int[size];
	initGui();
	
}
 
Example 8
Source File: DisplayTableModule.java    From FoxTelem with GNU General Public License v3.0 4 votes vote down vote up
/**
	 * Create a new module and set the title.  Initialize the name and value arrays.
	 * Create the GUI
	 * 
	 * @param title
	 * @param size
	 */
	public DisplayTableModule(FoxSpacecraft sat, String title, int size, int modType) {
		fox = sat;
		this.size = size;
		this.title = title;
		TitledBorder border = new TitledBorder(null, title, TitledBorder.LEADING, TitledBorder.TOP, null, null);
		
		moduleType = modType;
		
		if (moduleType >= DISPLAY_VULCAN) {
			border.setTitleFont(new Font("SansSerif", Font.BOLD, 10));
			border.setTitleColor(vulcanFontColor);
		} else {
			border.setTitleFont(new Font("SansSerif", Font.BOLD, 12));	
			border.setTitleColor(Color.BLUE);
//			maxValue = new JLabel[size];
//			minValue = new JLabel[size];

		}
		this.setBorder(border);
		
		displayTableModel = new DisplayTableModel();
		table = new JTable(displayTableModel);
		table.setFillsViewportHeight(true);
		table.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
		table.setOpaque(false);
		
		add(new JScrollPane(table));
		
		//add(table);

		TableColumn column = null;
		column = table.getColumnModel().getColumn(0);
		column.setPreferredWidth(130);
		column.setMinWidth(60);
		data = new String[size][4];
		
		for (int i=1; i<4; i++) {
			column = table.getColumnModel().getColumn(i);
			//column.sizeWidthToFit();
			column.setPreferredWidth(25);
			column.setMinWidth(25);
		}

		
		fieldName = new String[size]; 
//		rtValue = new JLabel[size];
//		label = new JLabel[size];
//		row = new JPanel[size];
		graph = new GraphFrame[size];
		display = new int[size];
		initGui();
		
	}