本文整理了Java中javax.swing.JLayeredPane.moveToFront()
方法的一些代码示例,展示了JLayeredPane.moveToFront()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLayeredPane.moveToFront()
方法的具体详情如下:
包路径:javax.swing.JLayeredPane
类名称:JLayeredPane
方法名:moveToFront
暂无
代码示例来源:origin: magefree/mage
private void setCardBounds(MageCard card, Rectangle rectangle) {
card.setBounds(rectangle);
card.setCardBounds(rectangle.x, rectangle.y, cardDimension.width, cardDimension.height);
cardArea.moveToFront(card);
}
代码示例来源:origin: magefree/mage
battlefieldPanel.moveToFront(panel);
} catch (Exception e) {
e.printStackTrace();
代码示例来源:origin: magefree/mage
private void addCard(CardView card, BigCard bigCard, UUID gameId, Rectangle rectangle) {
if (card instanceof AbilityView) {
CardView tmp = ((AbilityView) card).getSourceCard();
tmp.overrideRules(card.getRules());
tmp.setIsAbility(true);
tmp.overrideTargets(card.getTargets());
tmp.setAbility(card); // cross-reference, required for ability picker
card = tmp;
}
MageCard cardPanel = Plugins.instance.getMageCard(card, bigCard, cardDimension, gameId, true, true);
cardPanel.setBounds(rectangle);
cardPanel.addMouseListener(this);
cardArea.add(cardPanel);
cardArea.moveToFront(cardPanel);
cardPanel.update(card);
cardPanel.setCardBounds(rectangle.x, rectangle.y, cardDimension.width, cardDimension.height);
// new card have same settings as current view
cardPanel.setCardCaptionTopOffset(yCardCaptionOffsetPercent);
cardPanel.showCardTitle();
}
代码示例来源:origin: edu.toronto.cs.medsavant/medsavant-client
public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
if (ON_TOP_COMMAND.equals(cmd)) {
if (onTop.isSelected())
layeredPane.moveToFront(dukeLabel);
else
layeredPane.moveToBack(dukeLabel);
} else if (LAYER_COMMAND.equals(cmd)) {
int position = onTop.isSelected() ? 0 : 1;
layeredPane.setLayer(dukeLabel,
layerList.getSelectedIndex(),
position);
}
}
代码示例来源:origin: stackoverflow.com
JLayeredPane pane = new JLayeredPane();
for (int i = 0; i < 4; i++) {
JLabel lbl = new JLabel("Jlabel-"+(i+1));
lbl.setOpaque(true);
lbl.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent e) {
if (pane.getPosition(lbl) != 0)
pane.moveToFront(lbl);
}
});
lbl.setFont(lbl.getFont().deriveFont(48f));
lbl.setForeground(new Color(i*10, i*50, i*50));
lbl.setBorder(new LineBorder(Color.BLACK, 2));
lbl.setBounds(i*100, i*25, lbl.getPreferredSize().width, lbl.getPreferredSize().height);
pane.add(lbl, 0, new Integer(i+1));
}
代码示例来源:origin: stackoverflow.com
public void mousePressed(MouseEvent e) {
JLabel label = (JLabel) e.getComponent();
moveToFront(label);
offset = e.getPoint();
代码示例来源:origin: stackoverflow.com
add(overLayPane, new Integer(5));
moveToFront(overLayPane);
代码示例来源:origin: stackoverflow.com
public void mousePressed(MouseEvent e) {
layeredPane.moveToFront(panel);
代码示例来源:origin: stackoverflow.com
layer.moveToFront(btnOK);
代码示例来源:origin: JetBrains/jediterm
myInnerPanel.moveToFront(component);
myInnerPanel.revalidate();
myInnerPanel.repaint();
内容来源于网络,如有侵权,请联系作者删除!