當前位置: 首頁>>代碼示例>>Java>>正文


Java JScrollPane.setVisible方法代碼示例

本文整理匯總了Java中javax.swing.JScrollPane.setVisible方法的典型用法代碼示例。如果您正苦於以下問題:Java JScrollPane.setVisible方法的具體用法?Java JScrollPane.setVisible怎麽用?Java JScrollPane.setVisible使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.JScrollPane的用法示例。


在下文中一共展示了JScrollPane.setVisible方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initBoutonAjouter

import javax.swing.JScrollPane; //導入方法依賴的package包/類
/**
 * initialisation du panneaux contenant les boutons qui permettent d'ajouter
 * une personne
 */
private void initBoutonAjouter() {
	JPanel panneauChamp = new JPanel();
	panneauChamp.setLayout(new BoxLayout(panneauChamp, BoxLayout.LINE_AXIS));
	panneauChamp.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
	JScrollPane pane = new JScrollPane(panneauChamp);
	this.add(pane, BorderLayout.EAST);
	pane.setVisible(true);
	panneauChamp.add(Box.createHorizontalGlue());
	panneauChamp.add(new JLabel("Nom : "));
	panneauChamp.add(Box.createRigidArea(new Dimension(5, 0)));
	this.nom = new JTextField(5);
	panneauChamp.add(nom);
	
	panneauChamp.add(Box.createRigidArea(new Dimension(10, 0)));
	panneauChamp.add(new JLabel("Prenom : "));
	panneauChamp.add(Box.createRigidArea(new Dimension(5, 0)));
	this.prenom = new JTextField(5);
	panneauChamp.add(prenom);
	
	panneauChamp.add(Box.createRigidArea(new Dimension(10, 0)));
	panneauChamp.add(new JLabel("Fonction : "));
	panneauChamp.add(Box.createRigidArea(new Dimension(5, 0)));
	this.fonction = new JTextField(10);
	panneauChamp.add(fonction);
	
	panneauChamp.add(Box.createRigidArea(new Dimension(20, 0)));
	panneauChamp.add(new JButton(new ActionAjouterPersonne()));
	
	this.add(panneauChamp);
	
	
}
 
開發者ID:TeamLDCCIIT,項目名稱:Java_GestionProjet,代碼行數:37,代碼來源:PanneauBasProjet.java

示例2: mxCellEditor

import javax.swing.JScrollPane; //導入方法依賴的package包/類
/**
 * 
 */
public mxCellEditor(mxGraphComponent graphComponent)
{
	this.graphComponent = graphComponent;

	// Creates the plain text editor
	textArea = new JTextArea();
	textArea.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
	textArea.setOpaque(false);

	// Creates the HTML editor
	editorPane = new JEditorPane();
	editorPane.setOpaque(false);
	editorPane.setBackground(new Color(0,0,0,0));
	editorPane.setContentType("text/html");

	// Workaround for inserted linefeeds in HTML markup with
	// lines that are longar than 80 chars
	editorPane.setEditorKit(new NoLinefeedHtmlEditorKit());

	// Creates the scollpane that contains the editor
	// FIXME: Cursor not visible when scrolling
	scrollPane = new JScrollPane();
	scrollPane.setBorder(BorderFactory.createEmptyBorder());
	scrollPane.getViewport().setOpaque(false);
	scrollPane.setVisible(false);
	scrollPane.setOpaque(false);

	// Installs custom actions
	editorPane.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
	textArea.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
	editorPane.getActionMap().put(SUBMIT_TEXT, textSubmitAction);
	textArea.getActionMap().put(SUBMIT_TEXT, textSubmitAction);

	// Remembers the action map key for the enter keystroke
	editorEnterActionMapKey = editorPane.getInputMap().get(enterKeystroke);
	textEnterActionMapKey = editorPane.getInputMap().get(enterKeystroke);
}
 
開發者ID:GDSRS,項目名稱:TrabalhoFinalEDA2,代碼行數:41,代碼來源:mxCellEditor.java

示例3: mxCellEditor

import javax.swing.JScrollPane; //導入方法依賴的package包/類
/**
 * 
 */
public mxCellEditor(mxGraphComponent graphComponent) {
  this.graphComponent = graphComponent;

  // Creates the plain text editor
  textArea = new JTextArea();
  textArea.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
  textArea.setOpaque(false);

  // Creates the HTML editor
  editorPane = new JEditorPane();
  editorPane.setOpaque(false);
  editorPane.setBackground(new Color(0, 0, 0, 0));
  editorPane.setContentType("text/html");

  // Workaround for inserted linefeeds in HTML markup with
  // lines that are longar than 80 chars
  editorPane.setEditorKit(new NoLinefeedHtmlEditorKit());

  // Creates the scollpane that contains the editor
  // FIXME: Cursor not visible when scrolling
  scrollPane = new JScrollPane();
  scrollPane.setBorder(BorderFactory.createEmptyBorder());
  scrollPane.getViewport().setOpaque(false);
  scrollPane.setVisible(false);
  scrollPane.setOpaque(false);

  // Installs custom actions
  editorPane.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
  textArea.getActionMap().put(CANCEL_EDITING, cancelEditingAction);
  editorPane.getActionMap().put(SUBMIT_TEXT, textSubmitAction);
  textArea.getActionMap().put(SUBMIT_TEXT, textSubmitAction);

  // Remembers the action map key for the enter keystroke
  editorEnterActionMapKey = editorPane.getInputMap().get(enterKeystroke);
  textEnterActionMapKey = editorPane.getInputMap().get(enterKeystroke);
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:40,代碼來源:mxCellEditor.java


注:本文中的javax.swing.JScrollPane.setVisible方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。