@ -1,13 +1,241 @@
import Drawnings.* ;
import Entities.EntityAirbus ;
import Entities.EntityPlane ;
import javax.swing.* ;
import javax.swing.border.Border ;
import java.awt.* ;
import java.awt.datatransfer.DataFlavor ;
import java.awt.datatransfer.StringSelection ;
import java.awt.datatransfer.Transferable ;
import java.awt.datatransfer.UnsupportedFlavorException ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionListener ;
import java.awt.event.MouseAdapter ;
import java.awt.event.MouseEvent ;
import java.io.IOException ;
import java.util.Random ;
public class FormAirbusConfig extends JFrame {
DrawningAirbus _airbus = null ;
ComponentPortholes compPortholesCircle ;
ComponentPortholes compPortholesHeart ;
ComponentPortholes compPortholesSquare ;
FormAirbusConfig ( ) {
InitializeComponent ( ) ;
}
/ / / / drag and drop
/ / для переноса типа объекта в лэйбл
private class LabelTransferHandler extends TransferHandler {
@Override
public int getSourceActions ( JComponent c ) {
return TransferHandler . COPY ;
}
@Override
protected Transferable createTransferable ( JComponent c ) {
return new StringSelection ( ( ( JLabel ) c ) . getText ( ) ) ;
}
}
/ / перетаскиваемый panel . color
private class ColorTransferable implements Transferable {
private Color color ;
private static final DataFlavor colorDataFlavor = new DataFlavor ( Color . class , " Color " ) ;
public ColorTransferable ( Color color ) {
this . color = color ;
}
@Override
public DataFlavor [ ] getTransferDataFlavors ( ) {
return new DataFlavor [ ] { colorDataFlavor } ;
}
@Override
public boolean isDataFlavorSupported ( DataFlavor flavor ) {
return colorDataFlavor . equals ( flavor ) ;
}
@Override
public Object getTransferData ( DataFlavor flavor ) throws UnsupportedFlavorException , IOException {
if ( isDataFlavorSupported ( flavor ) ) {
return color ;
} else {
throw new UnsupportedFlavorException ( flavor ) ;
}
}
}
/ / для переноса цвета в лэйбл
private class PanelTransferHandler extends TransferHandler {
@Override
public int getSourceActions ( JComponent c ) {
return TransferHandler . COPY ;
}
@Override
protected Transferable createTransferable ( JComponent c ) {
return new ColorTransferable ( ( ( JPanel ) c ) . getBackground ( ) ) ;
}
}
/ / нажатие на панель / лэйбл
private class LabelMouseAdapter extends MouseAdapter {
@Override
public void mousePressed ( MouseEvent e ) {
( ( JLabel ) e . getComponent ( ) ) . getTransferHandler ( ) . exportAsDrag ( ( ( JLabel ) e . getComponent ( ) ) , e , TransferHandler . COPY ) ;
}
}
private class PanelMouseAdapter extends MouseAdapter {
@Override
public void mousePressed ( MouseEvent e ) {
( ( JPanel ) e . getComponent ( ) ) . getTransferHandler ( ) . exportAsDrag ( ( ( JPanel ) e . getComponent ( ) ) , e , TransferHandler . COPY ) ;
}
}
/ / приём перетаскиваемого цвета
private class ColorBody_DragDrop extends TransferHandler {
@Override
public boolean canImport ( TransferHandler . TransferSupport support ) {
return support . isDataFlavorSupported ( ColorTransferable . colorDataFlavor ) ;
}
@Override
public boolean importData ( TransferHandler . TransferSupport support ) {
if ( canImport ( support ) ) {
try {
Color color = ( Color ) support . getTransferable ( ) . getTransferData ( ColorTransferable . colorDataFlavor ) ;
if ( _airbus = = null )
return false ;
_airbus . entityAirbus . changeBodyColor ( color ) ;
canvas . repaint ( ) ;
return true ;
} catch ( UnsupportedFlavorException | IOException e ) {
e . printStackTrace ( ) ;
}
}
return false ;
}
}
private class ColorAdditional_DragDrop extends TransferHandler {
@Override
public boolean canImport ( TransferHandler . TransferSupport support ) {
return support . isDataFlavorSupported ( ColorTransferable . colorDataFlavor ) ;
}
@Override
public boolean importData ( TransferHandler . TransferSupport support ) {
if ( canImport ( support ) ) {
try {
Color color = ( Color ) support . getTransferable ( ) . getTransferData ( ColorTransferable . colorDataFlavor ) ;
if ( _airbus = = null )
return false ;
if ( ! ( _airbus instanceof DrawningPlane ) )
return false ;
( ( EntityPlane ) _airbus . entityAirbus ) . changeAdditionalColor ( color ) ;
return true ;
} catch ( UnsupportedFlavorException | IOException e ) {
e . printStackTrace ( ) ;
}
}
return false ;
}
}
/ / перетаскиваемые иллюминаторы
private class PortholesTransferable implements Transferable {
private IDrawningPortholes drawningPortholes ;
private static final DataFlavor portholesDrawingDataFlavor = new DataFlavor ( IDrawningPortholes . class , " Portholes Drawning " ) ;
public PortholesTransferable ( IDrawningPortholes portholes )
{
drawningPortholes = portholes ;
}
@Override
public DataFlavor [ ] getTransferDataFlavors ( ) {
return new DataFlavor [ ] { portholesDrawingDataFlavor } ;
}
@Override
public boolean isDataFlavorSupported ( DataFlavor flavor ) {
return flavor . equals ( portholesDrawingDataFlavor ) ;
}
@Override
public Object getTransferData ( DataFlavor flavor ) throws UnsupportedFlavorException , IOException {
if ( isDataFlavorSupported ( flavor ) ) {
return drawningPortholes ;
} else {
throw new UnsupportedFlavorException ( flavor ) ;
}
}
}
private class ComponentPortholes extends JComponent {
public IDrawningPortholes drawningPortholes ;
public ComponentPortholes ( IDrawningPortholes drawningPortholes1 )
{
drawningPortholes = drawningPortholes1 ;
addMouseListener ( new LabelPortholesMouseAdapter ( ) ) ;
setTransferHandler ( new LabelPortholesTransferHandler ( ) ) ;
}
private class LabelPortholesMouseAdapter extends MouseAdapter {
@Override
public void mousePressed ( MouseEvent e ) {
( ( ComponentPortholes ) e . getComponent ( ) ) . getTransferHandler ( ) . exportAsDrag ( ( ( ComponentPortholes ) e . getComponent ( ) ) , e , TransferHandler . COPY ) ;
}
}
private class LabelPortholesTransferHandler extends TransferHandler {
@Override
public int getSourceActions ( JComponent c ) {
return TransferHandler . COPY ;
}
@Override
protected Transferable createTransferable ( JComponent c ) {
return new PortholesTransferable ( ( ( ComponentPortholes ) c ) . drawningPortholes ) ;
}
}
public void paintComponent ( Graphics g ) {
super . paintComponents ( g ) ;
Graphics2D g2d = ( Graphics2D ) g ;
drawningPortholes . Draw ( g2d , - 13 , - 15 ) ;
super . repaint ( ) ;
}
}
/ / приём иллюминаторов
private class LabelPortholesTransferHandler extends TransferHandler {
@Override
public boolean canImport ( TransferHandler . TransferSupport support ) {
return support . isDataFlavorSupported ( PortholesTransferable . portholesDrawingDataFlavor ) ;
}
@Override
public boolean importData ( TransferHandler . TransferSupport support ) {
if ( canImport ( support ) ) {
try {
IDrawningPortholes portholes = ( IDrawningPortholes ) support . getTransferable ( ) . getTransferData ( PortholesTransferable . portholesDrawingDataFlavor ) ;
if ( _airbus = = null )
return false ;
portholes . SetCount ( _airbus . _portholes . getCount ( ) ) ;
_airbus . _portholes = portholes ;
canvas . repaint ( ) ;
} catch ( UnsupportedFlavorException | IOException e ) {
e . printStackTrace ( ) ;
}
}
return false ;
}
}
private void InitializeComponent ( ) {
/ / инициализация
Random rand = new Random ( ) ;
@ -15,6 +243,7 @@ public class FormAirbusConfig extends JFrame {
canvas = new Canvas ( ) ;
groupBoxConfig = new JPanel ( ) ;
groupBoxColors = new JPanel ( ) ;
groupBoxPortholes = new JPanel ( ) ;
panelObject = new JPanel ( ) ;
panelRed = new JPanel ( ) ;
panelYellow = new JPanel ( ) ;
@ -28,51 +257,66 @@ public class FormAirbusConfig extends JFrame {
labelBodyColor = new JLabel ( " Основной цвет " , SwingConstants . CENTER ) ;
labelSimpleObject = new JLabel ( " Простой " , SwingConstants . CENTER ) ;
labelComplexObject = new JLabel ( " Продвинутый " , SwingConstants . CENTER ) ;
labelPortholes = new JLabel ( " Иллюминаторы " , SwingConstants . CENTER ) ;
labelSpeed = new JLabel ( " Скорость: " ) ;
labelWeight = new JLabel ( " В е с : " ) ;
labelPortholesCount = new JLabel ( " Кол-во иллюминаторов: " ) ;
buttonOk = new JButton ( " Добавить " ) ;
buttonCancel = new JButton ( " Отмена " ) ;
checkBoxAdditionalEngine = new JCheckBox ( " Добавить доп. двигатель " ) ;
checkBoxCompartment = new JCheckBox ( " Добавить пассажирский отсек " ) ;
spinnerModelSpeed = new SpinnerNumberModel ( rand . nextInt ( 900 ) + 100 , 100 .0 , 1000 .0 , 1 . 0 ) ;
spinnerModelSpeed = new SpinnerNumberModel ( rand . nextInt ( 900 ) + 100 , 100 , 1000 , 1 ) ;
numericUpDownSpeed = new JSpinner ( spinnerModelSpeed ) ;
spinnerModelWeight = new SpinnerNumberModel ( rand . nextInt ( 1000 ) + 100 , 100 .0 , 1000 .0 , 1 . 0 ) ;
spinnerModelWeight = new SpinnerNumberModel ( rand . nextInt ( 1000 ) + 100 , 100 , 1000 , 1 ) ;
numericUpDownWeight = new JSpinner ( spinnerModelWeight ) ;
spinnerModelPortholesCount = new SpinnerNumberModel ( 10 , 10 , 30 , 10 ) ;
numericUpDownPortholesCount = new JSpinner ( spinnerModelPortholesCount ) ;
compPortholesCircle = new ComponentPortholes ( new DrawningPortholesCircle ( ) ) ;
compPortholesHeart = new ComponentPortholes ( new DrawningPortholesHeart ( ) ) ;
compPortholesSquare = new ComponentPortholes ( new DrawningPortholesSquare ( ) ) ;
/ / реализация
/ / groupBoxConfig
groupBoxConfig . setBorder ( BorderFactory . createTitledBorder ( " Параметры " ) ) ;
groupBoxConfig . setSize ( 620 , 243 ) ;
groupBoxConfig . setSize ( 620 , 2 7 3) ;
groupBoxConfig . setLocation ( 24 , 16 ) ;
groupBoxConfig . setLayout ( null ) ;
groupBoxConfig . add ( numericUpDownSpeed ) ;
groupBoxConfig . add ( numericUpDownWeight ) ;
groupBoxConfig . add ( numericUpDownPortholesCount ) ;
groupBoxConfig . add ( labelSpeed ) ;
groupBoxConfig . add ( labelWeight ) ;
groupBoxConfig . add ( labelPortholesCount ) ;
groupBoxConfig . add ( checkBoxAdditionalEngine ) ;
groupBoxConfig . add ( checkBoxCompartment ) ;
groupBoxConfig . add ( groupBoxColors ) ;
groupBoxConfig . add ( groupBoxColors ) ;
groupBoxConfig . add ( labelSimpleObject ) ;
groupBoxConfig . add ( labelComplexObject ) ;
groupBoxConfig . add ( groupBoxPortholes ) ;
/ / numericUpDownSpeed
numericUpDownSpeed . setSize ( 79 , 27 ) ;
numericUpDownSpeed . setLocation ( 1 0 6, 41 ) ;
numericUpDownSpeed . setLocation ( 1 7 6, 41 ) ;
/ / numericUpDownWeight
numericUpDownWeight . setSize ( 79 , 27 ) ;
numericUpDownWeight . setLocation ( 106 , 88 ) ;
numericUpDownWeight . setLocation ( 176 , 73 ) ;
/ / numericUpDownPortholesCount
numericUpDownPortholesCount . setSize ( 79 , 27 ) ;
numericUpDownPortholesCount . setLocation ( 176 , 105 ) ;
/ / checkBoxAdditionalEngine
checkBoxAdditionalEngine . setSize ( 204 , 24 ) ;
checkBoxAdditionalEngine . setLocation ( 22 , 151 ) ;
checkBoxAdditionalEngine . setLocation ( 22 , 20 1) ;
/ / checkBoxCompartment
checkBoxCompartment . setSize ( 204 , 24 ) ;
checkBoxCompartment . setLocation ( 22 , 186 ) ;
checkBoxCompartment . setLocation ( 22 , 23 1) ;
/ / labelSpeed
labelSpeed . setSize ( 80 , 20 ) ;
labelSpeed . setLocation ( 22 , 43 ) ;
/ / labelWeight
labelWeight . setSize ( 36 , 20 ) ;
labelWeight . setLocation ( 22 , 95 ) ;
labelWeight . setLocation ( 22 , 75 ) ;
/ / labelPortholesCount
labelPortholesCount . setSize ( 150 , 20 ) ;
labelPortholesCount . setLocation ( 22 , 107 ) ;
/ / groupBoxColors
groupBoxColors . setBorder ( BorderFactory . createTitledBorder ( " Цвета " ) ) ;
groupBoxColors . setSize ( 279 , 155 ) ;
@ -85,78 +329,128 @@ public class FormAirbusConfig extends JFrame {
groupBoxColors . add ( panelSilver ) ;
groupBoxColors . add ( panelOrange ) ;
groupBoxColors . add ( panelWhite ) ;
groupBoxConfig . add ( compPortholesCircle ) ;
groupBoxConfig . add ( compPortholesHeart ) ;
groupBoxConfig . add ( compPortholesSquare ) ;
groupBoxColors . setLayout ( null ) ;
/ / panelRed
panelRed . setBackground ( Color . RED ) ;
panelRed . setSize ( 40 , 40 ) ;
panelRed . setLocation ( 38 , 43 ) ;
panelRed . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelRed . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / panelYellow
panelYellow . setBackground ( Color . YELLOW ) ;
panelYellow . setSize ( 40 , 40 ) ;
panelYellow . setLocation ( 93 , 43 ) ;
panelYellow . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelYellow . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / panelBlue
panelBlue . setBackground ( Color . BLUE ) ;
panelBlue . setSize ( 40 , 40 ) ;
panelBlue . setLocation ( 148 , 43 ) ;
panelBlue . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelBlue . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / panelViolet
panelViolet . setBackground ( Color . MAGENTA ) ;
panelViolet . setSize ( 40 , 40 ) ;
panelViolet . setLocation ( 204 , 43 ) ;
panelViolet . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelViolet . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / panelGreen
panelGreen . setBackground ( Color . GREEN ) ;
panelGreen . setSize ( 40 , 40 ) ;
panelGreen . setLocation ( 38 , 96 ) ;
panelGreen . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelGreen . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / panelSilver
panelSilver . setBackground ( Color . LIGHT_GRAY ) ;
panelSilver . setSize ( 40 , 40 ) ;
panelSilver . setLocation ( 148 , 96 ) ;
panelSilver . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelSilver . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / panelOrange
panelOrange . setBackground ( Color . ORANGE ) ;
panelOrange . setSize ( 40 , 40 ) ;
panelOrange . setLocation ( 204 , 96 ) ;
panelOrange . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelOrange . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / panelWhite
panelWhite . setBackground ( Color . WHITE ) ;
panelWhite . setSize ( 40 , 40 ) ;
panelWhite . setLocation ( 93 , 96 ) ;
colorPanels = new JPanel [ ] {
panelRed , panelYellow , panelBlue , panelViolet ,
panelGreen , panelWhite , panelOrange , panelSilver ,
} ;
panelWhite . setTransferHandler ( new PanelTransferHandler ( ) ) ;
panelWhite . addMouseListener ( new PanelMouseAdapter ( ) ) ;
/ / groupBoxPortholes
groupBoxPortholes . setBorder ( BorderFactory . createTitledBorder ( " Иллюминаторы " ) ) ;
groupBoxPortholes . setSize ( 200 , 58 ) ;
groupBoxPortholes . setLocation ( 43 , 130 ) ;
groupBoxPortholes . setLayout ( null ) ;
groupBoxPortholes . add ( compPortholesCircle ) ;
groupBoxPortholes . add ( compPortholesHeart ) ;
groupBoxPortholes . add ( compPortholesSquare ) ;
/ / compPortholesCircle
compPortholesCircle . setSize ( 30 , 30 ) ;
compPortholesCircle . setLocation ( 25 , 20 ) ;
compPortholesCircle . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
/ / compPortholesHeart
compPortholesHeart . setSize ( 30 , 30 ) ;
compPortholesHeart . setLocation ( 75 , 20 ) ;
compPortholesHeart . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
/ / compPortholesSquare
compPortholesSquare . setSize ( 30 , 30 ) ;
compPortholesSquare . setLocation ( 125 , 20 ) ;
compPortholesSquare . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
/ / labelComplexObject
labelComplexObject . setSize ( 120 , 38 ) ;
labelComplexObject . setLocation ( 464 , 185 ) ;
labelComplexObject . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
labelComplexObject . setTransferHandler ( new LabelTransferHandler ( ) ) ;
labelComplexObject . addMouseListener ( new LabelMouseAdapter ( ) ) ;
/ / labelSimpleObject
labelSimpleObject . setSize ( 120 , 38 ) ;
labelSimpleObject . setLocation ( 314 , 185 ) ;
labelSimpleObject . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
/ / buttonOk
buttonOk . setSize ( 107 , 43 ) ;
buttonOk . setLocation ( 666 , 212 ) ;
/ / buttonCancel
buttonCancel . setSize ( 107 , 43 ) ;
buttonCancel . setLocation ( 796 , 212 ) ;
/ / labelBodyColor
labelBodyColor . setSize ( 107 , 38 ) ;
labelBodyColor . setLocation ( 18 , 9 ) ;
labelBodyColor . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
/ / labelAdditionalColor
labelAdditionalColor . setSize ( 107 , 38 ) ;
labelAdditionalColor . setLocation ( 138 , 9 ) ;
labelAdditionalColor . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
labelSimpleObject . setTransferHandler ( new LabelTransferHandler ( ) ) ;
labelSimpleObject . addMouseListener ( new LabelMouseAdapter ( ) ) ;
/ / panelObject
panelObject . setSize ( 264, 171 ) ;
panelObject . setSize ( 382 , 190 ) ;
panelObject . setLocation ( 650 , 21 ) ;
panelObject . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
panelObject . add ( labelAdditionalColor ) ;
panelObject . add ( labelBodyColor ) ;
panelObject . add ( labelPortholes ) ;
panelObject . add ( canvas ) ;
panelObject . setLayout ( null ) ;
/ / labelBodyColor
labelBodyColor . setSize ( 107 , 38 ) ;
labelBodyColor . setLocation ( 18 , 9 ) ;
labelBodyColor . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
labelBodyColor . setTransferHandler ( new ColorBody_DragDrop ( ) ) ;
/ / labelAdditionalColor
labelAdditionalColor . setSize ( 107 , 38 ) ;
labelAdditionalColor . setLocation ( 138 , 9 ) ;
labelAdditionalColor . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
labelAdditionalColor . setTransferHandler ( new ColorAdditional_DragDrop ( ) ) ;
/ / labelPortholes
labelPortholes . setSize ( 107 , 38 ) ;
labelPortholes . setLocation ( 258 , 9 ) ;
labelPortholes . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
labelPortholes . setTransferHandler ( new LabelPortholesTransferHandler ( ) ) ;
/ / canvas
canvas . setSize ( 347 , 109 ) ;
canvas . setLocation ( 18 , 55 ) ;
canvas . setBorder ( BorderFactory . createLineBorder ( Color . lightGray ) ) ;
canvas . setTransferHandler ( new Canvas_Drop ( ) ) ;
/ / buttonOk
buttonOk . setSize ( 107 , 43 ) ;
buttonOk . setLocation ( 726 , 242 ) ;
/ / buttonCancel
buttonCancel . setSize ( 107 , 43 ) ;
buttonCancel . setLocation ( 856 , 242 ) ;
buttonCancel . addActionListener ( buttonCancel_Click ) ;
/ / FormAirbusConfig
frame . setSize ( 952 , 313 ) ;
frame . setSize ( 1074, 360 ) ;
frame . setLayout ( null ) ;
frame . add ( groupBoxConfig ) ;
frame . add ( panelObject ) ;
@ -165,28 +459,73 @@ public class FormAirbusConfig extends JFrame {
frame . setVisible ( true ) ;
}
ActionListener buttonCancel_Click = new ActionListener ( ) {
@Override
public void actionPerformed ( ActionEvent e ) {
frame . dispose ( ) ;
}
} ;
private class Canvas_Drop extends TransferHandler {
@Override
public boolean canImport ( TransferHandler . TransferSupport support ) {
return support . isDataFlavorSupported ( DataFlavor . stringFlavor ) ;
}
@Override
public boolean importData ( TransferHandler . TransferSupport support ) {
if ( canImport ( support ) ) {
try {
String data = ( String ) support . getTransferable ( ) . getTransferData ( DataFlavor . stringFlavor ) ;
switch ( data ) {
case " Простой " :
_airbus = new DrawningAirbus ( ( int ) numericUpDownSpeed . getValue ( ) , ( int ) numericUpDownWeight . getValue ( ) , Color . DARK_GRAY , ( int ) numericUpDownPortholesCount . getValue ( ) , canvas . getWidth ( ) , canvas . getHeight ( ) ) ;
break ;
case " Продвинутый " :
_airbus = new DrawningPlane ( ( int ) numericUpDownSpeed . getValue ( ) , ( int ) numericUpDownWeight . getValue ( ) , Color . DARK_GRAY , ( int ) numericUpDownPortholesCount . getValue ( ) , Color . BLACK , checkBoxCompartment . isSelected ( ) , checkBoxAdditionalEngine . isSelected ( ) , canvas . getWidth ( ) , canvas . getHeight ( ) ) ;
break ;
}
canvas . repaint ( ) ;
return true ;
} catch ( UnsupportedFlavorException | IOException e ) {
e . printStackTrace ( ) ;
}
}
return false ;
}
}
class Canvas extends JComponent {
public Canvas ( ) { }
public void paintComponent ( Graphics g ) {
if ( _airbus = = null ) {
return ;
}
super . paintComponents ( g ) ;
Graphics2D g2d = ( Graphics2D ) g ;
_airbus . SetPosition ( 5 , 5 ) ;
_airbus . DrawTransport ( g2d ) ;
super . repaint ( ) ;
}
}
private JFrame frame ;
JFrame frame ;
private Canvas canvas ;
private JPanel groupBoxConfig ;
private JPanel groupBoxPortholes ;
private JSpinner numericUpDownWeight ;
private SpinnerModel spinnerModelWeight ;
private JSpinner numericUpDownSpeed ;
private SpinnerModel spinnerModelSpeed ;
private JSpinner numericUpDownPortholesCount ;
private SpinnerModel spinnerModelPortholesCount ;
private JCheckBox checkBoxAdditionalEngine ;
private JCheckBox checkBoxCompartment ;
private JLabel labelWeight ;
private JLabel labelSpeed ;
private JLabel labelPortholesCount ;
private JPanel groupBoxColors ;
private JPanel [ ] colorPanels ;
private JPanel panelRed ;
private JPanel panelYellow ;
private JPanel panelBlue ;
@ -199,7 +538,8 @@ public class FormAirbusConfig extends JFrame {
private JLabel labelSimpleObject ;
private JLabel labelBodyColor ;
private JLabel labelAdditionalColor ;
private JButton buttonOk ;
private JLabel labelPortholes ;
public JButton buttonOk ;
private JButton buttonCancel ;
private JPanel panelObject ;
}