public Array<TextureRegion> getSelectedRegions () { CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout(); TexturePanel panel = getCurrentRegionPanel(); return panel.selectedRegions; }
public Array<TextureRegion> getSelectedRegions () { CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout(); TexturePanel panel = getCurrentRegionPanel(); return panel.selectedRegions; }
@Override public void actionPerformed (ActionEvent arg0) { if(atlas == null) return; CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout(); layout.next(regionsPanel); } });
@Override public void actionPerformed (ActionEvent arg0) { if(atlas == null) return; CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout(); layout.previous(regionsPanel); } });
@Override public void actionPerformed (ActionEvent arg0) { if(atlas == null) return; CustomCardLayout layout = (CustomCardLayout)regionsPanel.getLayout(); layout.next(regionsPanel); } });
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()); } });
@Override public void actionPerformed (ActionEvent arg0) { JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content); TexturePanel currentTexturePanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel; listener.onRegionsSelected(currentTexturePanel.selectedRegions); } });
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()); } });
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()); } });
@Override public void actionPerformed (ActionEvent arg0) { JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content); TexturePanel currentPanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel; currentPanel.clearSelection(); } });
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()); } });
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()); } });
@Override public void actionPerformed (ActionEvent arg0) { JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content); TexturePanel currentPanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel; currentPanel.clearSelection(); } });
@Override public void actionPerformed (ActionEvent arg0) { JPanel panel = ((CustomCardLayout)content.getLayout()).getCurrentCard(content); TexturePanel currentTexturePanel = panel == atlasPanel ? atlasPanel.getCurrentRegionPanel() : texturePanel; listener.onRegionsSelected(currentTexturePanel.selectedRegions); } });
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()); } });
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()); } });
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(); }
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(); }
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(); }
@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(); } });