java.awt.Panel.repaint()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(286)

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

Panel.repaint介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

  1. public void showDialog() {
  2. createCheckboxes();
  3. pnlPacks.setVisible(true);
  4. pnlPacks.revalidate();
  5. pnlPacks.repaint();
  6. this.pack();
  7. this.revalidate();
  8. this.repaint();
  9. this.setVisible(true);
  10. this.setModal(true);
  11. }

代码示例来源:origin: ome/bio-formats_plugins

  1. @Override
  2. public void textValueChanged(TextEvent e) {
  3. int red = getColorValue(redField);
  4. int green = getColorValue(greenField);
  5. int blue = getColorValue(blueField);
  6. swatch.setBackground(new Color(red, green, blue));
  7. swatch.repaint();
  8. }
  9. };

代码示例来源:origin: openmicroscopy/bioformats

  1. @Override
  2. public void textValueChanged(TextEvent e) {
  3. int red = getColorValue(redField);
  4. int green = getColorValue(greenField);
  5. int blue = getColorValue(blueField);
  6. swatch.setBackground(new Color(red, green, blue));
  7. swatch.repaint();
  8. }
  9. };

代码示例来源:origin: sc.fiji/Trainable_Segmentation

  1. /**
  2. * Repaint all panels
  3. */
  4. public void repaintAll()
  5. {
  6. this.annotationsPanel.repaint();
  7. getCanvas().repaint();
  8. this.buttonsPanel.repaint();
  9. this.all.repaint();
  10. }

代码示例来源:origin: sc.fiji/Trainable_Segmentation

  1. /**
  2. * Repaint all panels
  3. */
  4. public void repaintAll()
  5. {
  6. this.annotationsPanel.repaint();
  7. getCanvas().repaint();
  8. this.buttonsPanel.repaint();
  9. this.all.repaint();
  10. }

代码示例来源:origin: fiji/Trainable_Segmentation

  1. /**
  2. * Repaint all panels
  3. */
  4. public void repaintAll()
  5. {
  6. this.annotationsPanel.repaint();
  7. getCanvas().repaint();
  8. this.buttonsPanel.repaint();
  9. this.all.repaint();
  10. }

代码示例来源:origin: fiji/Trainable_Segmentation

  1. /**
  2. * Repaint all panels
  3. */
  4. public void repaintAll()
  5. {
  6. this.annotationsPanel.repaint();
  7. getCanvas().repaint();
  8. this.buttonsPanel.repaint();
  9. this.all.repaint();
  10. }

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

  1. locY = 900;
  2. dead = true;
  3. gamePanel.repaint();
  4. state.setText(STATE_STR + sr);
  5. xBGLoc.setText(X_BG_STR + bgx);
  6. gamePanel.repaint();

代码示例来源:origin: sc.fiji/Image_5D

  1. void addChannelSelectorOverlay() {
  2. if (channelSelectorOverlay == null) {
  3. channelSelectorOverlay = new ChannelSelectorOverlay(this);
  4. }
  5. if (scrollbarWL != null) selectorPanel.remove(tiledSelectorPanel);
  6. if (tiledSelectorPanel != null) selectorPanel.remove(scrollbarWL);
  7. selectorPanel.add(channelSelectorOverlay, BorderLayout.CENTER);
  8. win.pack();
  9. selectorPanel.repaint();
  10. }

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

  1. bgX = 0;
  2. state = 1;
  3. gamePanel.repaint(); // These 2 lines automatically restart the game
  4. gamePanel.repaint();
  5. updateLabels();

代码示例来源:origin: sc.fiji/Image_5D

  1. void addTiledSelectorPanel() {
  2. if (channelSelectorOverlay == null) {
  3. channelSelectorOverlay = new ChannelSelectorOverlay(this);
  4. }
  5. if (tiledSelectorPanel == null) {
  6. tiledSelectorPanel = new Panel(new BorderLayout());
  7. }
  8. if (allGrayInTilesBox == null) {
  9. allGrayInTilesBox = new Checkbox("all gray", displayGrayInTiles);
  10. allGrayInTilesBox.addItemListener(this);
  11. allGrayInTilesBox.addKeyListener(win);
  12. allGrayInTilesBox.addKeyListener(ij);
  13. allGrayInTilesBox.addKeyListener(win);
  14. }
  15. if (channelSelectorOverlay != null) selectorPanel
  16. .remove(channelSelectorOverlay);
  17. if (scrollbarWL != null) selectorPanel.remove(scrollbarWL);
  18. tiledSelectorPanel.add(allGrayInTilesBox, BorderLayout.NORTH);
  19. tiledSelectorPanel.add(channelSelectorOverlay, BorderLayout.CENTER);
  20. selectorPanel.add(tiledSelectorPanel, BorderLayout.CENTER);
  21. win.pack();
  22. selectorPanel.repaint();
  23. }

代码示例来源:origin: google/sagetv

  1. public void windowGainedFocus(java.awt.event.WindowEvent evt)
  2. {
  3. if (titleStyle != WIN2K_TITLE_STYLE)
  4. {
  5. closeButton.setImage(closeButtonRedBGActive);
  6. minButton.setImage(minWindowImageBG);
  7. if (maxButton != null)
  8. maxButton.setImage(maxWindowImageBG);
  9. }
  10. titleBar.setBackground(TITLE_BG_COLOR);
  11. titleLabel.setForeground((titleStyle == MAC_TITLE_STYLE) ? java.awt.Color.black : java.awt.Color.white);
  12. titleLabel.invalidate();
  13. titleLabel.repaint();
  14. SageTVWindow.this.invalidate();
  15. SageTVWindow.this.repaint();
  16. invalidateExtraComponents();
  17. titleBar.validate();
  18. titleBar.repaint();
  19. }

代码示例来源:origin: google/sagetv

  1. public void windowLostFocus(java.awt.event.WindowEvent evt)
  2. {
  3. if (titleStyle != WIN2K_TITLE_STYLE)
  4. {
  5. closeButton.setImage(closeButtonRedBGDisabled);
  6. minButton.setImage(minWindowImageBGDisabled);
  7. if (maxButton != null)
  8. maxButton.setImage(maxWindowImageBGDisabled);
  9. }
  10. titleBar.setBackground(TITLE_DISABLE_COLOR);
  11. titleLabel.setForeground((titleStyle == MAC_TITLE_STYLE) ? java.awt.Color.gray : java.awt.Color.white);
  12. titleLabel.invalidate();
  13. titleLabel.repaint();
  14. SageTVWindow.this.invalidate();
  15. SageTVWindow.this.repaint();
  16. invalidateExtraComponents();
  17. titleBar.validate();
  18. titleBar.repaint();
  19. }
  20. });

代码示例来源:origin: sc.fiji/Image_5D

  1. void addScrollbar() {
  2. nChannels = i5d.getNChannels();
  3. if (scrollbarWL == null) {
  4. scrollbarWL =
  5. new ScrollbarWithLabel(Scrollbar.VERTICAL, 1, 1, 1, nChannels + 1, i5d
  6. .getDimensionLabel(2));
  7. scrollbarWL.addAdjustmentListener(this);
  8. scrollbarWL.setFocusable(false); // prevents scroll bar from accepting key
  9. // shortcuts and from blinking on
  10. // Windows
  11. }
  12. else {
  13. scrollbarWL.setMaximum(nChannels + 1);
  14. }
  15. int blockIncrement = nChannels / 10;
  16. if (blockIncrement < 1) blockIncrement = 1;
  17. scrollbarWL.setUnitIncrement(1);
  18. scrollbarWL.setBlockIncrement(blockIncrement);
  19. if (channelSelectorOverlay != null) selectorPanel
  20. .remove(channelSelectorOverlay);
  21. if (tiledSelectorPanel != null) selectorPanel.remove(tiledSelectorPanel);
  22. selectorPanel.add(scrollbarWL, BorderLayout.CENTER);
  23. win.pack();
  24. selectorPanel.repaint();
  25. }

代码示例来源:origin: sc.fiji/VIB_

  1. gd.showDialog();
  2. bl.layoutContainer(all);
  3. all.repaint();
  4. if(gd.wasCanceled())
  5. return;

相关文章