javax.swing.JScrollPane.updateUI()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(206)

本文整理了Java中javax.swing.JScrollPane.updateUI()方法的一些代码示例,展示了JScrollPane.updateUI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JScrollPane.updateUI()方法的具体详情如下:
包路径:javax.swing.JScrollPane
类名称:JScrollPane
方法名:updateUI

JScrollPane.updateUI介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-explorer

@Override
public void updateUI() {
  super.updateUI();
  if( null != tableCell )
    tableCell.updateUI();
}

代码示例来源:origin: antlr/antlr3

public void actionPerformed(ActionEvent e) {
    view.listRules.getView().updateUI();
  }
};

代码示例来源:origin: antlr/antlr3

public void actionPerformed(ActionEvent e) {
    view.listRules.getView().updateUI();
  }
};

代码示例来源:origin: org.antlr/gunit

public void actionPerformed(ActionEvent e) {
    view.listRules.getView().updateUI();
  }
};

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

public void updateUI() {
  super.updateUI();
  //On GTK L&F, the viewport border must be set to empty (not null!) or we still get border buildup
  setViewportBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

@Override
public void updateUI() {
  Set<VisualizerChildren> tmp = visHolder;
  if (tmp != null) {
    tmp.clear();
  }
  super.updateUI();
  //On GTK L&F, the viewport border must be set to empty (not null!) or we still get border buildup
  setViewportBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

public void updateUI() {
  super.updateUI();
  //On GTK L&F, the viewport border must be set to empty (not null!) or we still get border buildup
  setViewportBorder(BorderFactory.createEmptyBorder());
  setBorder(BorderFactory.createEmptyBorder());
}

代码示例来源:origin: biojava/biojava

@Override
public void stateChanged(ChangeEvent e) {
  JSlider source = (JSlider)e.getSource();
  if ( source.getValueIsAdjusting()) {
    //return;
  }
  //System.out.println("Changed scale to "+source.getValue());
  mPanel.setScale((float)source.getValue()/SLIDER_STEPS);
  scroll.repaint();
  scroll.updateUI();
}

代码示例来源:origin: com.synaptix/SynaptixWidget

@Override
public void updateUI() {
  super.updateUI();
  setUI(UIManager.getUI(this));
}

代码示例来源:origin: stackoverflow.com

// the panel
 JPanel buttonPanel = new JPanel();
 buttonPanel.setLayout(new GridBagLayout());
 buttonPanel.setSize(new Dimension(400, 300)); // whatever
 // the scrollpane
 JScrollPane pane = new JScrollPane();
 pane.setSize(new Dimension(400, 300)); // whatever
 // GridBagConstraint for button
 GridBagConstraints constraint = new GridBagConstraints();
 constraint.anchor = GridBagConstraints.CENTER;
 constraint.fill = GridBagConstraints.NONE;
 constraint.gridx = 0;
 constraint.gridy = GridBagConstraints.RELATIVE;
 constraint.weightx = 1.0f;
 constraint.weighty = 1.0f;
 int sizeOfButtons = 50;
 for(int i = 0; i < sizeOfButtons; i++) {
   JButton button = new JButton();
   button.setText("Button #" + i);
   // other attributes you will set
   buttonPanel.add(button, constraint);
 }
 pane.setViewportView(buttonPanel);
 this.rootPane.add(pane); // or other panel etc.
 pane.updateUI();

代码示例来源:origin: com.fifesoft.rtext/fife.common

/**
 * Resets the UI property with a value from the current look and feel.
 * This overrides <code>JComponent</code>'s <code>updateUI</code> method,
 * so that the popup menus are updated as well.
 */
@Override
public void updateUI() {
  super.updateUI();
  if (vertSBMenu!=null)
    SwingUtilities.updateComponentTreeUI(vertSBMenu);
  if (horizSBMenu!=null)
    SwingUtilities.updateComponentTreeUI(horizSBMenu);
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
public void updateUI() {
  super.updateUI();
  setViewportBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
  setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
  setVerticalScrollBarPolicy(VERTICAL_SCROLLBAR_NEVER);
  setHorizontalScrollBarPolicy(HORIZONTAL_SCROLLBAR_NEVER);
  setWheelScrollingEnabled(false);
}

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

/** Creates new form FontChooserPanel */
public PaletteFontChooserSelectionPanel() {
   labels = ResourceBundleUtil.getBundle("org.jhotdraw.gui.Labels");
  initComponents();
  collectionList.setModel(new DefaultListModel());
  familyList.setModel(new DefaultListModel());
  faceList.setModel(new DefaultListModel());
  
  // Customization of Quaqua Look and Feel: Set small scroll bars
  collectionsScrollPane.putClientProperty("JComponent.sizeVariant", "small");
  familiesScrollPane.putClientProperty("JComponent.sizeVariant", "small");
  facesScrollPane.putClientProperty("JComponent.sizeVariant", "small");
  // Customization of Nimbus Look and Feel: Set small scroll bars
  collectionsScrollPane.getVerticalScrollBar().putClientProperty("JComponent.sizeVariant", "small");
  familiesScrollPane.getVerticalScrollBar().putClientProperty("JComponent.sizeVariant", "small");
  facesScrollPane.getVerticalScrollBar().putClientProperty("JComponent.sizeVariant", "small");
  collectionsScrollPane.getVerticalScrollBar().updateUI();
  familiesScrollPane.updateUI();
  facesScrollPane.getVerticalScrollBar().updateUI();
  setOpaque(true);
  setBackground(new Color(0xededed));
}

代码示例来源:origin: com.jidesoft/jide-oss

@Override
public void updateUI() {
  super.updateUI();
  setLayout(new JideScrollPaneLayout.UIResource());
  if (getBorder() instanceof UIResource) {
    LookAndFeel.installBorder(this, "JideScrollPane.border");
  }
}

代码示例来源:origin: de.dfki.mary/marytts-transcription

/**
 * Add words from file
 * 
 * @param fileName
 *            fileName
 */
public void addWordsToTranscription(String fileName) {
  try {
    this.transcriptionModel.loadTranscription(fileName, true);
  } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
  checkTranscription();
  scrollpane.updateUI();
  table.repaint();
  this.repaint();
  this.updateUI();
}

代码示例来源:origin: de.dfki.mary/marytts-transcription

/**
 * Load transcription from a hashmap
 * 
 * @param map
 *            map
 * @throws Exception
 *             Exception
 */
@Deprecated
// doesn't seem to get used -- remove?
public void loadTranscription(HashMap<String, Integer> map) throws Exception {
  this.transcriptionModel.loadTranscription(map);
  checkTranscription();
  scrollpane.updateUI();
  table.repaint();
  this.repaint();
  this.updateUI();
}

代码示例来源:origin: de.dfki.mary/marytts-transcription

/**
 * Load transcription from file
 * 
 * @param fileName
 *            fileName
 */
public void loadTranscription(String fileName) {
  try {
    this.transcriptionModel.loadTranscription(fileName, false);
  } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
  }
  checkTranscription();
  scrollpane.updateUI();
  table.repaint();
  this.repaint();
  this.updateUI();
}

代码示例来源:origin: stackoverflow.com

System.out.println(getHeight() + " : " + (getHeight() + LINE_HEIGHT));
super.setPreferredSize(new Dimension(getWidth(), getHeight() + LINE_HEIGHT) );
parentPane.updateUI();
super.revalidate();
System.out.println(getHeight());

代码示例来源:origin: com.jidesoft/jide-oss

@Override
public void updateUI() {
  super.updateUI();
  setLayout(new SimpleScrollPaneLayout.UIResource());
  LookAndFeel.installBorder(this, "JideScrollPane.border");
  getViewport().addChangeListener(this);
}

代码示例来源:origin: de.dfki.mary/marytts-transcription

/**
 * Load transcription from a arrayList
 * 
 * @param arrList
 *            arrList
 * @throws Exception
 *             Exception
 */
public void loadTranscription(ArrayList<String> arrList) throws Exception {
  this.transcriptionModel.loadTranscription(arrList);
  checkTranscription();
  scrollpane.updateUI();
  table.repaint();
  this.repaint();
  this.updateUI();
}

相关文章

微信公众号

最新文章

更多

JScrollPane类方法