nersNum;
private GUI gui;
private Map lt; JSpinner, Integer [] gt; spinnersTopValues;
public ObjectCreatorViewer (GUI gui, Store store, ct, it,
final int topItemsNum,
final int topContainersNum) {
this . gui=gui;
this . ct=ct;
this . it=it;
this . topItemsNum=topItemsNum;
this . topContainersNum=topContainersNum;
this . store=store;
this . spinnersTopValues ??= new HashMap lt; JSpinner, Integer [] gt; (); containersNumPanel= new JPanel ();= new JSpinner ( new SpinnerNumberModel (1, 1, topContainersNum, 1)); (containersNum) ;. put (containersNum, new Integer [] {1, topContainersNum}) ;. add ( new JLabel ( Колічесвто контейнерів (1 - + topContainersNum + ): )) ;. add (containersNum); cVolumePanel= new JPanel ();
int bottomContainerVolume=ct. getVolume (). getBegin ();
int topContainerVolume=ct. getVolume (). getEnd ();= new JSpinner ( new SpinnerNumberModel (bottomContainerVolume, bottomContainerVolume, topContainerVolume, 1)); (cVolume) ;. put (cVolume, new Integer [] {bottomContainerVolume, topContainerVolume}) ;. add ( new JLabel ( Обсяг одного контейнера, max ( + bottomContainerVolume + - + topContainerVolume + ): )) ;. add (cVolume); cargoPanel= new JPanel ();
int bottomCargo=ct. getCargo (). getBegin ();
int topCargo=ct. getCargo (). getEnd ();= new JSpinner ( new SpinnerNumberModel (bottomCargo, bottomCargo, topCargo, 1)); (cargo) ;. put (cargo, new Integer [] {bottomCargo, topCargo}) ;. add ( new JLabel ( Вантажопідйомність одного контейнера, max ( + bottomCargo + - + topCargo + ): )) ;. add (cargo);= new JPanel ( new GridBagLayout ()) ;. add (containersNumPanel, new GridBagConstraints (0, 0, 1, 1, 0, 0, GridBagConstraints. NORTHWEST ,. BASELINE , new Insets (5, 5, 5,5), 0, 0)) ;. add (cVolumePanel, new GridBagConstraints (0, 1, 1, 1, 0, 0, GridBagConstraints. NORTHWEST ,. BASELINE , new Insets (5, 5, 5,5), 0, 0)) ;. add (cargoPanel, new GridBagConstraints (0, 2, 1, 2, 0, 0, GridBagConstraints. NORTHWEST ,. BASELINE , new Insets (5, 5, 5,5), 0, 0)) ;. setBorder (BorderFactory. createTitledBorder ( Створення контейнерів )); itemsNumPanel= new JPanel ();= new JSpinner ( new SpinnerNumberModel (1, 1, topItemsNum, 1)); (itemsNum) ;. put (itemsNum, new Integer [] {1, topItemsNum}) ;. add ( new JLabel ( Колічесвто об'єктів (1 - + topItemsNum + ): )) ;. add (itemsNum); iVolumePanel= new JPanel ();
int singleItemBottomVolume=it. getVolume (). getBegin ();
int singleItemTopVolume=it. getVolume (). getEnd ();= new JSpinner ( new SpinnerNumberModel (singleItemBottomVolume, singleItemBottomVolume, singleItemTopVolume, 1)); (iVolume) ;. put (iVolume, new Integer [] {singleItemBottomVolume, singleItemTopVolume}) ;. add ( new JLabel ( Обсяг одного об'єкта, max ( + singleItemBottomVolume + - + singleItemTopVolume + ): )) ;. add (iVolume); weightPanel= new JPanel ();
int singleItemBottomWeight=it. getVolume (). getBegin ();
int singleItemTopWeight=it. getVolume (). getEnd ();= new JSpinner ( new SpinnerNumberModel (singleItemBottomWeight, singleItemBottomWeight, singleItemTopWeight, 1)); (weight) ;. put (weight, new ...