本文整理了Java中javax.swing.JPanel.getLayout()
方法的一些代码示例,展示了JPanel.getLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.getLayout()
方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:getLayout
暂无
代码示例来源:origin: libgdx/libgdx
public Array<TextureRegion> getSelectedRegions () {
CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout();
TexturePanel panel = getCurrentRegionPanel();
return panel.selectedRegions;
}
代码示例来源:origin: libgdx/libgdx
public Array<TextureRegion> getSelectedRegions () {
CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout();
TexturePanel panel = getCurrentRegionPanel();
return panel.selectedRegions;
}
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
if(atlas == null) return;
CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout();
layout.next(regionsPanel);
}
});
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
if(atlas == null) return;
CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout();
layout.previous(regionsPanel);
}
});
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
if(atlas == null) return;
CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout();
layout.next(regionsPanel);
}
});
代码示例来源:origin: libgdx/libgdx
public void actionPerformed (ActionEvent event) {
boolean visible = !highMaxSlider.isVisible();
highMaxSlider.setVisible(visible);
highRangeButton.setText(visible ? "<" : ">");
GridBagLayout layout = (GridBagLayout)formPanel.getLayout();
GridBagConstraints constraints = layout.getConstraints(highRangeButton);
constraints.gridx = visible ? 5 : 4;
layout.setConstraints(highRangeButton, constraints);
Slider slider = visible ? highMaxSlider : highMinSlider;
value.setHighMax((Float)slider.getValue());
}
});
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content);
TexturePanel currentTexturePanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel;
listener.onRegionsSelected(currentTexturePanel.selectedRegions);
}
});
代码示例来源:origin: libgdx/libgdx
public void actionPerformed (ActionEvent event) {
boolean visible = !highMaxSlider.isVisible();
highMaxSlider.setVisible(visible);
highRangeButton.setText(visible ? "<" : ">");
GridBagLayout layout = (GridBagLayout)formPanel.getLayout();
GridBagConstraints constraints = layout.getConstraints(highRangeButton);
constraints.gridx = visible ? 5 : 4;
layout.setConstraints(highRangeButton, constraints);
Slider slider = visible ? highMaxSlider : highMinSlider;
ScaledNumericPanel.this.value.setHighMax(slider.getValue());
}
});
代码示例来源:origin: libgdx/libgdx
public void actionPerformed (ActionEvent event) {
boolean visible = !lowMaxSlider.isVisible();
lowMaxSlider.setVisible(visible);
lowRangeButton.setText(visible ? "<" : ">");
GridBagLayout layout = (GridBagLayout)formPanel.getLayout();
GridBagConstraints constraints = layout.getConstraints(lowRangeButton);
constraints.gridx = visible ? 5 : 4;
layout.setConstraints(lowRangeButton, constraints);
Slider slider = visible ? lowMaxSlider : lowMinSlider;
value.setLowMax((Float)slider.getValue());
}
});
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content);
TexturePanel currentPanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel;
currentPanel.clearSelection();
}
});
代码示例来源:origin: libgdx/libgdx
public void actionPerformed (ActionEvent event) {
boolean visible = !lowMaxSlider.isVisible();
lowMaxSlider.setVisible(visible);
lowRangeButton.setText(visible ? "<" : ">");
GridBagLayout layout = (GridBagLayout)formPanel.getLayout();
GridBagConstraints constraints = layout.getConstraints(lowRangeButton);
constraints.gridx = visible ? 5 : 4;
layout.setConstraints(lowRangeButton, constraints);
Slider slider = visible ? lowMaxSlider : lowMinSlider;
value.setLowMax((Float)slider.getValue());
}
});
代码示例来源:origin: libgdx/libgdx
public void actionPerformed (ActionEvent event) {
boolean visible = !highMaxSlider.isVisible();
highMaxSlider.setVisible(visible);
highRangeButton.setText(visible ? "<" : ">");
GridBagLayout layout = (GridBagLayout)formPanel.getLayout();
GridBagConstraints constraints = layout.getConstraints(highRangeButton);
constraints.gridx = visible ? 5 : 4;
layout.setConstraints(highRangeButton, constraints);
Slider slider = visible ? highMaxSlider : highMinSlider;
ScaledNumericPanel.this.value.setHighMax(slider.getValue());
}
});
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content);
TexturePanel currentPanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel;
currentPanel.clearSelection();
}
});
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content);
TexturePanel currentTexturePanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel;
listener.onRegionsSelected(currentTexturePanel.selectedRegions);
}
});
代码示例来源:origin: libgdx/libgdx
public void actionPerformed (ActionEvent event) {
boolean visible = !highMaxSlider.isVisible();
highMaxSlider.setVisible(visible);
highRangeButton.setText(visible ? "<" : ">");
GridBagLayout layout = (GridBagLayout)formPanel.getLayout();
GridBagConstraints constraints = layout.getConstraints(highRangeButton);
constraints.gridx = visible ? 5 : 4;
layout.setConstraints(highRangeButton, constraints);
Slider slider = visible ? highMaxSlider : highMinSlider;
value.setHighMax((Float)slider.getValue());
}
});
代码示例来源:origin: libgdx/libgdx
public void actionPerformed (ActionEvent event) {
boolean visible = !lowMaxSlider.isVisible();
lowMaxSlider.setVisible(visible);
lowRangeButton.setText(visible ? "<" : ">");
GridBagLayout layout = (GridBagLayout)formPanel.getLayout();
GridBagConstraints constraints = layout.getConstraints(lowRangeButton);
constraints.gridx = visible ? 5 : 4;
layout.setConstraints(lowRangeButton, constraints);
Slider slider = visible ? lowMaxSlider : lowMinSlider;
ScaledNumericPanel.this.value.setLowMax(slider.getValue());
}
});
代码示例来源:origin: libgdx/libgdx
public void setAtlas (TextureAtlas atlas) {
atlasPanel.clearSelection();
atlasPanel.setAtlas(atlas);
CustomCardLayout cardLayout = (CustomCardLayout)content.getLayout();
cardLayout.show(content, "atlas");
showGenerationPanel(false);
content.revalidate();
content.repaint();
revalidate();
repaint();
}
代码示例来源:origin: libgdx/libgdx
public void setTexture(Texture texture){
texturePanel.clearSelection();
texturePanel.setTexture(texture);
CustomCardLayout cardLayout = (CustomCardLayout)content.getLayout();
cardLayout.show(content, "texture");
showGenerationPanel(true);
content.revalidate();
content.repaint();
revalidate();
repaint();
}
代码示例来源:origin: libgdx/libgdx
public void setAtlas (TextureAtlas atlas) {
atlasPanel.clearSelection();
atlasPanel.setAtlas(atlas);
CustomCardLayout cardLayout = (CustomCardLayout)content.getLayout();
cardLayout.show(content, "atlas");
showGenerationPanel(false);
content.revalidate();
content.repaint();
revalidate();
repaint();
}
代码示例来源:origin: libgdx/libgdx
@Override
public void actionPerformed (ActionEvent arg0) {
JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content);
TexturePanel currentTexturePanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel;
currentTexturePanel.selectedRegions.reverse();
currentTexturePanel.revalidate();
currentTexturePanel.repaint();
}
});
内容来源于网络,如有侵权,请联系作者删除!