Search in sources :

Example 1 with AutoPlacementFinder

use of tools.image.AutoPlacementFinder in project triplea by triplea-game.

the class MapCreator method createPart2Panel.

private void createPart2Panel() {
    panel2.removeAll();
    panel2.setLayout(new BoxLayout(panel2, BoxLayout.PAGE_AXIS));
    panel2.add(Box.createVerticalStrut(30));
    panel2.add(new JLabel("Map Skin Utilities:"));
    panel2.add(Box.createVerticalStrut(30));
    final JButton mapPropertiesMakerButton = new JButton("Run the Map Properties Maker");
    mapPropertiesMakerButton.addActionListener(SwingAction.of("Run the Map Properties Maker", e -> runUtility(MapPropertiesMaker::run)));
    panel2.add(mapPropertiesMakerButton);
    panel2.add(Box.createVerticalStrut(30));
    final JButton centerPickerButton = new JButton("Run the Center Picker");
    centerPickerButton.addActionListener(SwingAction.of("Run the Center Picker", e -> runUtility(CenterPicker::run)));
    panel2.add(centerPickerButton);
    panel2.add(Box.createVerticalStrut(30));
    final JButton polygonGrabberButton = new JButton("Run the Polygon Grabber");
    polygonGrabberButton.addActionListener(SwingAction.of("Run the Polygon Grabber", e -> runUtility(PolygonGrabber::run)));
    panel2.add(polygonGrabberButton);
    panel2.add(Box.createVerticalStrut(30));
    final JButton autoPlacerButton = new JButton("Run the Automatic Placement Finder");
    autoPlacerButton.addActionListener(SwingAction.of("Run the Automatic Placement Finder", e -> runUtility(AutoPlacementFinder::run)));
    panel2.add(autoPlacerButton);
    panel2.add(Box.createVerticalStrut(30));
    final JButton placementPickerButton = new JButton("Run the Placement Picker");
    placementPickerButton.addActionListener(SwingAction.of("Run the Placement Picker", e -> runUtility(PlacementPicker::run)));
    panel2.add(placementPickerButton);
    panel2.add(Box.createVerticalStrut(30));
    final JButton tileBreakerButton = new JButton("Run the Tile Image Breaker");
    tileBreakerButton.addActionListener(SwingAction.of("Run the Tile Image Breaker", e -> runUtility(TileImageBreaker::run)));
    panel2.add(tileBreakerButton);
    panel2.add(Box.createVerticalStrut(30));
    final JButton decorationPlacerButton = new JButton("Run the Decoration Placer");
    decorationPlacerButton.addActionListener(SwingAction.of("Run the Decoration Placer", e -> runUtility(DecorationPlacer::run)));
    panel2.add(decorationPlacerButton);
    panel2.add(Box.createVerticalStrut(30));
    panel2.validate();
}
Also used : FocusListener(java.awt.event.FocusListener) JTextField(javax.swing.JTextField) ReliefImageBreaker(tools.image.ReliefImageBreaker) LookAndFeel(games.strategy.engine.framework.lookandfeel.LookAndFeel) Action(javax.swing.Action) PolygonGrabber(tools.image.PolygonGrabber) JMenuItem(javax.swing.JMenuItem) DecorationPlacer(tools.image.DecorationPlacer) TileImageBreaker(tools.image.TileImageBreaker) BorderLayout(java.awt.BorderLayout) JFrame(javax.swing.JFrame) ClientSetting(games.strategy.triplea.settings.ClientSetting) BoxLayout(javax.swing.BoxLayout) JMenuBar(javax.swing.JMenuBar) TileImageReconstructor(tools.image.TileImageReconstructor) JButton(javax.swing.JButton) CenterPicker(tools.image.CenterPicker) UnitImageFactory(games.strategy.triplea.image.UnitImageFactory) JMenu(javax.swing.JMenu) Component(java.awt.Component) File(java.io.File) FileSave(tools.image.FileSave) Box(javax.swing.Box) Consumer(java.util.function.Consumer) JScrollPane(javax.swing.JScrollPane) AutoPlacementFinder(tools.image.AutoPlacementFinder) Dimension(java.awt.Dimension) ToolArguments(tools.util.ToolArguments) OpenFileUtility(games.strategy.net.OpenFileUtility) FocusEvent(java.awt.event.FocusEvent) JLabel(javax.swing.JLabel) UrlConstants(games.strategy.triplea.UrlConstants) JTextArea(javax.swing.JTextArea) JPanel(javax.swing.JPanel) WindowConstants(javax.swing.WindowConstants) SwingAction(games.strategy.ui.SwingAction) CenterPicker(tools.image.CenterPicker) PolygonGrabber(tools.image.PolygonGrabber) TileImageBreaker(tools.image.TileImageBreaker) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) DecorationPlacer(tools.image.DecorationPlacer) JLabel(javax.swing.JLabel) AutoPlacementFinder(tools.image.AutoPlacementFinder)

Aggregations

LookAndFeel (games.strategy.engine.framework.lookandfeel.LookAndFeel)1 OpenFileUtility (games.strategy.net.OpenFileUtility)1 UrlConstants (games.strategy.triplea.UrlConstants)1 UnitImageFactory (games.strategy.triplea.image.UnitImageFactory)1 ClientSetting (games.strategy.triplea.settings.ClientSetting)1 SwingAction (games.strategy.ui.SwingAction)1 BorderLayout (java.awt.BorderLayout)1 Component (java.awt.Component)1 Dimension (java.awt.Dimension)1 FocusEvent (java.awt.event.FocusEvent)1 FocusListener (java.awt.event.FocusListener)1 File (java.io.File)1 Consumer (java.util.function.Consumer)1 Action (javax.swing.Action)1 Box (javax.swing.Box)1 BoxLayout (javax.swing.BoxLayout)1 JButton (javax.swing.JButton)1 JFrame (javax.swing.JFrame)1 JLabel (javax.swing.JLabel)1 JMenu (javax.swing.JMenu)1