本文整理了Java中javax.swing.JLayeredPane.setComponentZOrder()
方法的一些代码示例,展示了JLayeredPane.setComponentZOrder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLayeredPane.setComponentZOrder()
方法的具体详情如下:
包路径:javax.swing.JLayeredPane
类名称:JLayeredPane
方法名:setComponentZOrder
暂无
代码示例来源:origin: magefree/mage
battlefieldPanel.moveToFront(attachedPermanent);
battlefieldPanel.moveToFront(permWithAttachments);
mainPanel.setComponentZOrder(attachedPermanent, ZOrder--);
VerticalIndex--;
代码示例来源:origin: magefree/mage
private void groupAttachments(BattlefieldPanel battlefieldPanel, JLayeredPane mainPanel, Map<UUID, MagePermanent> permanents, PermanentView permanentWithAttachmentsView) {
MagePermanent permWithAttachments = permanents.get(permanentWithAttachmentsView.getId());
if (permWithAttachments == null) {
return;
}
// Calculate how many vertical columns are needed and number of attachements
AttachmentLayoutInfos attachmentLayoutInfos = calculateNeededNumberOfVerticalColumns(0, battlefieldPanel, permanents, permanentWithAttachmentsView);
int position = battlefieldPanel.getPosition(permWithAttachments); // relative position within the layer
// permWithAttachments.getLinks().clear();
Rectangle rectangleBaseCard = permWithAttachments.getBounds();
if (!Plugins.instance.isCardPluginLoaded()) {
permWithAttachments.getLinks().clear();
for (UUID attachmentId : permanentWithAttachmentsView.getAttachments()) {
MagePermanent link = permanents.get(attachmentId);
if (link != null) {
permWithAttachments.getLinks().add(link);
rectangleBaseCard.translate(20, 20);
link.setBounds(rectangleBaseCard);
battlefieldPanel.setPosition(link, ++position);
}
}
} else {
layoutAttachements(rectangleBaseCard.getX(), attachmentLayoutInfos.getColumns(),
attachmentLayoutInfos.getAttachments(), permanentWithAttachmentsView, permanents, battlefieldPanel, mainPanel, rectangleBaseCard);
mainPanel.setComponentZOrder(permWithAttachments, 0);
}
}
代码示例来源:origin: com.jidesoft/jide-oss
layeredPane.add(_panel, JLayeredPane.PALETTE_LAYER);
if (SystemInfo.isJdk15Above()) {
layeredPane.setComponentZOrder(_panel, 0);
内容来源于网络,如有侵权,请联系作者删除!