當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。