javax.swing.JLayeredPane.setPosition()方法的使用及代码示例

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

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

JLayeredPane.setPosition介绍

暂无

代码示例

代码示例来源:origin: eu.limetri.client/mapviewer-nb-swing

public void refreshSelectedLayer() {
  for (LayerPanel layerPanel : layerPanels) {
    if (layerPanel.getInfo() != null && layerPanel.getInfo().isSelected()) {
      layerPanelContainer.setPosition(layerPanel, ON_TOP);
    } else {
      layerPanelContainer.setPosition(layerPanel, ((int)layerPanel.getInfo().getOrder()/2) + 1); 
    }
  }
  revalidate();
}

代码示例来源:origin: nl.cloudfarming.client/cloudfarming-client-geoviewer-jxmap

/**
 * sets the active layer
 * null to set no active layer
 * 
 * @param lp
 */
public void setActiveLayer(ObjectLayerPanel lp) {
  //
  // remove new active layer from painters and add previous one
  //
  if (this.activePanel != null) {
    this.activePanel.setActive(false);
    this.layerPanelContainer.setPosition(this.activePanel, LAYER_PASSIVE);
    this.activePanel.repaint();
  }
  this.activePanel = lp;
  if (lp != null) {
    this.layerPanelContainer.setPosition(this.activePanel, LAYER_ACTIVE);
    this.activePanel.setActive(true);
    this.activePanel.repaint();
  }
}
/**

代码示例来源:origin: eu.limetri.client/mapviewer-nb-swing

public void repaintReorder(Collection<LayerPanel> values) {
  for (LayerPanel layerPanel: values) {
    layerPanelContainer.setPosition(layerPanel, (int)layerPanel.getInfo().getOrder()/2);
  }
  revalidate();
}

相关文章