当前位置: 首页>>代码示例>>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;未经允许,请勿转载。