当前位置: 首页>>代码示例>>Java>>正文


Java ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED属性代码示例

本文整理汇总了Java中javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED属性的典型用法代码示例。如果您正苦于以下问题:Java ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED属性的具体用法?Java ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED怎么用?Java ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.swing.ScrollPaneConstants的用法示例。


在下文中一共展示了ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED属性的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDevelopmentDialog

final private JDialog getDevelopmentDialog(	ControlJFrame objPcontrolJFrame,
											JTextArea objPdevelopmentJTextArea,
											ExtendedJButton objPdevelopmentCloseExtendedJButton) {

	// Development scrollpane :
	final JScrollPane objLdevelopmentJScrollPane =
													new JScrollPane(objPdevelopmentJTextArea,
																	ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
																	ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	objLdevelopmentJScrollPane.setOpaque(true);

	// Development dialog :
	final JDialog objLdevelopmentJDialog =
											new JDialog(objPcontrolJFrame,
														objPcontrolJFrame.getLanguageString(Language.intS_TITLE_DEVELOPMENT),
														true);
	objLdevelopmentJDialog.setLayout(new GridBagLayout());
	final ExtendedGridBagConstraints objLextendedGridBagConstraints =
																		new ExtendedGridBagConstraints(	0,
																										GridBagConstraints.RELATIVE,
																										1,
																										1,
																										GridBagConstraints.CENTER,
																										0,
																										0,
																										0,
																										10,
																										0,
																										0,
																										GridBagConstraints.BOTH,
																										1.0F,
																										1.0F);

	// Add content :
	objLdevelopmentJDialog.add(objLdevelopmentJScrollPane, objLextendedGridBagConstraints);
	objLextendedGridBagConstraints.setFilling(GridBagConstraints.NONE, 0.0F, 0.0F);
	objLdevelopmentJDialog.add(objPdevelopmentCloseExtendedJButton, objLextendedGridBagConstraints);
	objLdevelopmentJDialog.addWindowListener(new JDialogWindowListener(objPcontrolJFrame, objLdevelopmentJDialog, false));
	return objLdevelopmentJDialog;
}
 
开发者ID:jugglemaster,项目名称:JuggleMasterPro,代码行数:40,代码来源:DevelopmentJMenuItem.java

示例2: WhoIsPanel

public WhoIsPanel(final ServiceFactory factory) {
	super(factory);
	final JPanel top = new JPanel();
	top.setLayout(new WrapLayout(FlowLayout.LEFT, 2, 0));
	_label = new JLabel("", SwingConstants.LEFT);
	top.add(_label);
	add(top, BorderLayout.NORTH);
	_textArea = new JTextArea("", 30, 70);
	_textArea.setEditable(false);
	final JScrollPane scroll = new JScrollPane(_textArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	add(scroll, BorderLayout.CENTER);
	_whois.addListener(this);
}
 
开发者ID:leolewis,项目名称:openvisualtraceroute,代码行数:13,代码来源:WhoIsPanel.java

示例3: DispQQPlotMatrix

public DispQQPlotMatrix(ModelWorkloadAnalysis m, int clustering) {
	super(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	this.model = m;
	this.setPreferredSize(new Dimension(420, 420));
	panel = new DispersionPanel(model);
	panel.setPreferredSize(new Dimension(DispersionPanel.WIDTH_TOT * model.getMatrix().getNumVariables(), DispersionPanel.HEIGHT_TOT
			* model.getMatrix().getNumVariables()));
	this.setViewportView(panel);
	addListener();
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:10,代码来源:DispQQPlotMatrix.java

示例4: QuickHTMLViewer

/**creates a new instance of this viewer, given the document's url, and sets up
 * visualization.
 * @param url: url of document that must be displayed.
 */
public QuickHTMLViewer(URL url) {
	this.centerWindow(640, 480);
	HtmlPanel html = new HtmlPanel(url);
	html.setAntiAliasing(true);
	JScrollPane jsp = new JScrollPane(html, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	this.getContentPane().add(jsp);
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:11,代码来源:QuickHTMLViewer.java

示例5: DispMatrix

public DispMatrix(ModelWorkloadAnalysis m) {
	/* Richiamo il costruttore della classe JScorllPanel impostando le barre di scorrimento solo se necessarie */
	super(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	this.model = m;
	/* Settaggio delle proprieta' del pannello di scroll */
	this.setPreferredSize(new Dimension(420, 420));
	/* Creazione e aggiunta del Pannello di visualizzazione della matrice di dispersione */
	panel = new DispersionPanel(model);
	panel.setPreferredSize(new Dimension(DispersionPanel.WIDTH_TOT * model.getMatrix().getNumVariables(), DispersionPanel.HEIGHT_TOT
			* model.getMatrix().getNumVariables()));
	this.setViewportView(panel);
	addListener();
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:13,代码来源:DispMatrix.java

示例6: getUpperTable

private JScrollPane getUpperTable() {
	clusteringFinalTable = new JTable(new clustDetModel(infos.numElem, infos.percent));
	clusteringFinalTable.setSelectionBackground(new Color(83, 126, 126));
	clusteringFinalTable.setSelectionForeground(Color.BLACK);
	clusteringFinalTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	return new JScrollPane(clusteringFinalTable, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:8,代码来源:FuzzyInfoClustering.java

示例7: initComponents

/**
 * Set up the panel contents and layout
 */
private void initComponents() {
	textPane = new JTextPane();
	help.addHelp(textPane, "Enter any text describing this model");

	//BEGIN Federico Dall'Orso 14/3/2005
	//OLD
	/*
	setLayout(new BorderLayout());
	JScrollPane esp = new JScrollPane(textPane);
	esp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
	add(esp, BorderLayout.CENTER);
	add(Box.createVerticalStrut(30), BorderLayout.NORTH);
	add(Box.createHorizontalStrut(20), BorderLayout.EAST);
	add(Box.createVerticalStrut(30), BorderLayout.SOUTH);
	add(Box.createHorizontalStrut(20), BorderLayout.WEST);
	*/
	//NEW
	JPanel intPanel = new JPanel(new BorderLayout(10, 10));
	//Box intPanel = Box.createVerticalBox();

	JScrollPane jsp = new JScrollPane(textPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	JLabel descrLabel = new JLabel(DESCRIPTION_COMMENT);

	intPanel.add(descrLabel, BorderLayout.NORTH);
	intPanel.add(jsp, BorderLayout.CENTER);
	//intPanel.add(jsp);

	setLayout(new BorderLayout());
	add(intPanel, BorderLayout.CENTER);
	add(Box.createVerticalStrut(30), BorderLayout.NORTH);
	add(Box.createVerticalStrut(30), BorderLayout.SOUTH);
	add(Box.createHorizontalStrut(20), BorderLayout.EAST);
	add(Box.createHorizontalStrut(20), BorderLayout.WEST);

	//END Federico Dall'Orso 14/3/2005

}
 
开发者ID:max6cn,项目名称:jmt,代码行数:40,代码来源:DescriptionPanel.java

示例8: initComponents

/**
 * Set up the panel contents and layout
 */
private void initComponents() {
	textPane = new JTextPane();
	help.addHelp(textPane, "Enter any text describing this model");

	//BEGIN Federico Dall'Orso 14/3/2005
	//OLD
	/*
	setLayout(new BorderLayout());
	JScrollPane esp = new JScrollPane(textPane);
	esp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
	add(esp, BorderLayout.CENTER);
	add(Box.createVerticalStrut(20), BorderLayout.NORTH);
	add(Box.createHorizontalStrut(20), BorderLayout.EAST);
	add(Box.createVerticalStrut(20), BorderLayout.SOUTH);
	add(Box.createHorizontalStrut(20), BorderLayout.WEST);
	*/
	//NEW
	JPanel intPanel = new JPanel(new BorderLayout(10, 10));
	//Box intPanel = Box.createVerticalBox();

	JScrollPane jsp = new JScrollPane(textPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
	JLabel descrLabel = new JLabel(DESCRIPTION_COMMENT);

	intPanel.add(descrLabel, BorderLayout.NORTH);
	intPanel.add(jsp, BorderLayout.CENTER);
	//intPanel.add(jsp);

	setLayout(new BorderLayout());
	add(intPanel, BorderLayout.CENTER);
	add(Box.createVerticalStrut(20), BorderLayout.NORTH);
	add(Box.createVerticalStrut(20), BorderLayout.SOUTH);
	add(Box.createHorizontalStrut(20), BorderLayout.EAST);
	add(Box.createHorizontalStrut(20), BorderLayout.WEST);

	//END Federico Dall'Orso 14/3/2005

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:40,代码来源:DescriptionPanel.java

示例9: initComponents

private void initComponents() {
	setLayout(new BorderLayout(5, 5));
	this.setBorder(new EmptyBorder(20, 20, 20, 20));
	//classesList = new JList(new StationsListModel());
	stationsList = new JList();
	stationsList.setListData(stationData.getStationKeys());
	stationsList.setCellRenderer(new StationElementRenderer());
	stationsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	panelDescription = new JLabel(STATIONS_PAR_DESCRIPTION);
	JScrollPane jsp = new JScrollPane(stationsList, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	jsp.setPreferredSize(new Dimension(140, 200));
	add(panelDescription, BorderLayout.NORTH);
	add(jsp, BorderLayout.WEST);
	stationsList.addListSelectionListener(new ListSelectionListener() {
		public void valueChanged(ListSelectionEvent e) {
			if (e.getValueIsAdjusting()) {
				return;
			}
			updateParsPane();
		}
	});
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:23,代码来源:AllStationsParametersPanel.java

示例10: manageTextFields

private void manageTextFields() {

		this.chatArea = new ChatArea();
		this.chatArea.setToolTipText("Message");
		this.chatArea.setFont(new Font("", Font.BOLD, 15));
		this.chatArea.setPreferredSize(new Dimension(this.essentials.getFrameSize().width / 2 - 300, 25));
		this.chatArea.setBorder(BorderFactory.createBevelBorder(1));

		this.rawMessageArea = new RawMessageArea();
		this.rawMessageArea.setToolTipText("Raw Message");
		this.rawMessageArea.setFont(new Font("", Font.BOLD, 15));
		this.rawMessageArea.setPreferredSize(new Dimension(this.essentials.getFrameSize().width / 2 - 300, 25));
		this.rawMessageArea.setBorder(BorderFactory.createBevelBorder(1));

		this.logArea = new JTextArea();
		this.logArea.setEditable(false);
		this.logArea.setFont(new Font("arial", Font.BOLD, 12));
		this.logArea.setBorder(BorderFactory.createBevelBorder(1));

		DefaultCaret caret = (DefaultCaret) this.logArea.getCaret();
		caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);

		this.scroll = new JScrollPane(this.logArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
				ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);

		this.logHeader = new JTextField("Communication Log");
		this.logHeader.setEditable(false);
		this.logHeader.setFont(new Font("arial", Font.BOLD, 25));
		this.logHeader.setBackground(this.getBackground());
		this.logHeader.setBorder(new EmptyBorder(0, 0, 10, 0));
		this.logHeader.setHorizontalAlignment(SwingConstants.CENTER);

		this.interactionHeader = new JTextField("Interaction Header");
		this.interactionHeader.setEditable(false);
		this.interactionHeader.setFont(new Font("arial", Font.BOLD, 25));
		this.interactionHeader.setBackground(this.getBackground());
		this.interactionHeader.setBorder(new EmptyBorder(0, 0, 10, 0));
		this.interactionHeader.setHorizontalAlignment(SwingConstants.CENTER);

		this.chatAreaDescription = new JTextField("Send Message:");
		this.chatAreaDescription.setEditable(false);
		this.chatAreaDescription.setBackground(this.getBackground());
		this.chatAreaDescription.setBorder(new EmptyBorder(0, 0, 0, 130 - this.chatAreaDescription.getPreferredSize().width));

		this.rawMessageAreaDescription = new JTextField("Send Raw Message:");
		this.rawMessageAreaDescription.setEditable(false);
		this.rawMessageAreaDescription.setBackground(this.getBackground());
		this.rawMessageAreaDescription
				.setBorder(new EmptyBorder(0, 0, 0, 130 - this.rawMessageAreaDescription.getPreferredSize().width));

		this.joinChannelBox = new JComboBox<>();
		this.joinChannelBox.setPreferredSize(new Dimension(this.essentials.getFrameSize().width / 2 - 300, 25));
		this.joinChannelBox.setBorder(BorderFactory.createBevelBorder(1));
		this.joinChannelBox.setEditable(true);
		this.joinChannelBox.insertItemAt("ukogmonkey", 0);
		this.joinChannelBox.insertItemAt("lobosjr", 1);
		this.joinChannelBox.insertItemAt("imaqtpie", 2);
		this.joinChannelBox.insertItemAt("iwilldominate", 3);

	}
 
开发者ID:Ativelox,项目名称:TwitchBot,代码行数:60,代码来源:MainView.java

示例11: DispFuzzyMatrix

public DispFuzzyMatrix() {
	super(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	this.setPreferredSize(new Dimension(420, 420));
	panel = new DispersionPanel();
	this.setViewportView(panel);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:6,代码来源:DispFuzzyMatrix.java

示例12: setTextArea

/**
 * Method description
 * 
 * @see
 * @param bytPiOType
 * @param bolPjMPFile
 */
private void setTextArea(byte bytPiOType, byte bytPfileExtension) {

	final JTextArea objLjTextArea =
									new JTextArea(25, Math.max(	135,
																this.objGcontrolJFrame	.getLanguageString(Language.intS_MESSAGE_SEPARATOR_LINE)
																						.length()));

	switch (bytPiOType) {
		case WriteFileJMenuItem.bytS_PATTERNS_FILE:
		case WriteFileJMenuItem.bytS_SITESWAPS_FILE:
			objLjTextArea.setText(this.objGcontrolJFrame.getPatternsManager()
														.toFileString(	Constants.bytS_UNCLASS_CURRENT,
																		bytPfileExtension,
																		true,
																		bytPiOType == WriteFileJMenuItem.bytS_PATTERNS_FILE,
																		true,
																		this.objGcontrolJFrame.objGobjectsJList.intGfilteredObjectIndexA,
																		this.objGcontrolJFrame.objGshortcutsJComboBox.intGfilteredShortcutIndexA,
																		this.objGcontrolJFrame.getLanguage()));
			break;
		case WriteFileJMenuItem.bytS_STYLES_FILE:
			objLjTextArea.setText(this.objGcontrolJFrame.getPatternsManager().toFileString(	Constants.bytS_UNCLASS_CURRENT,
																							bytPfileExtension,
																							false,
																							true,
																							false,
																							null,
																							null,
																							this.objGcontrolJFrame.getLanguage()));
			break;
		case WriteFileJMenuItem.bytS_NEW_PATTERNS_FILE:
			objLjTextArea.setText(this.objGcontrolJFrame.getLanguageString(bytPfileExtension == Constants.bytS_EXTENSION_JMP
																															? Language.intS_MESSAGE_PATTERNS_JMP_FILE_HEADER
																															: bytPfileExtension == Constants.bytS_EXTENSION_JM
																																												? Language.intS_MESSAGE_PATTERNS_JM_FILE_HEADER
																																												: bytPfileExtension == Constants.bytS_EXTENSION_JAP
																																																									? Language.intS_MESSAGE_PATTERNS_JAP_FILE_HEADER
																																																									: Constants.bytS_UNCLASS_NO_VALUE));
			break;
		case WriteFileJMenuItem.bytS_NEW_LANGUAGE_FILE:
		case WriteFileJMenuItem.bytS_NEW_EMPTY_LANGUAGE_FILE:
		case WriteFileJMenuItem.bytS_NEW_DEFAULT_LANGUAGE_FILE:
			objLjTextArea.setText(Language.getNewLanguageString(bytPiOType == WriteFileJMenuItem.bytS_NEW_DEFAULT_LANGUAGE_FILE));
			break;
		case WriteFileJMenuItem.bytS_CURRENT_LANGUAGE_FILE:
			objLjTextArea.setText(this.objGcontrolJFrame.getLanguage().getLanguageString());
			break;
	}

	objLjTextArea.setFont(new Font("Courier", Font.PLAIN, 11));
	objLjTextArea.setCaretPosition(0);
	objLjTextArea.setLineWrap(false);
	objLjTextArea.setOpaque(true);
	objLjTextArea.setEditable(false);

	final JScrollPane objLscrollPane =
										new JScrollPane(objLjTextArea,
														ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
														ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	objLscrollPane.setOpaque(true);
	objLscrollPane.setBorder(Constants.objS_GRAPHICS_JUGGLE_BORDER);
	this.add(objLscrollPane);
	this.validate();
	this.pack();
}
 
开发者ID:jugglemaster,项目名称:JuggleMasterPro,代码行数:72,代码来源:ExportJDialog.java

示例13: DispKMeanMatrix

public DispKMeanMatrix() {
	super(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	this.setPreferredSize(new Dimension(420, 420));
	panel = new DispersionPanel();
	this.setViewportView(panel);
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:6,代码来源:DispKMeanMatrix.java


注:本文中的javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。