Skip to content

Commit

Permalink
Added tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
benchdoos committed Aug 1, 2018
1 parent 40c8cd5 commit 4d6c8dc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ public MaterialEntity getMaterialEntity() {
panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
buttonOK = new JButton();
buttonOK.setText("OK");
buttonOK.setMnemonic('O');
buttonOK.setDisplayedMnemonicIndex(0);
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
buttonCancel = new JButton();
buttonCancel.setText("Отмена");
Expand All @@ -259,8 +261,8 @@ public MaterialEntity getMaterialEntity() {
activeCheckBox.setHorizontalTextPosition(2);
activeCheckBox.setSelected(true);
activeCheckBox.setText("Активна:");
activeCheckBox.setMnemonic('А');
activeCheckBox.setDisplayedMnemonicIndex(0);
activeCheckBox.setMnemonic('К');
activeCheckBox.setDisplayedMnemonicIndex(1);
panel3.add(activeCheckBox, new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
final JLabel label3 = new JLabel();
label3.setText("Марка (полная):");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<grid id="cbd77" binding="contentPane" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="10" left="10" bottom="10" right="10"/>
<constraints>
<xy x="48" y="54" width="673" height="317"/>
<xy x="48" y="54" width="591" height="317"/>
</constraints>
<properties/>
<border type="none"/>
Expand Down Expand Up @@ -56,7 +56,7 @@
</grid>
</constraints>
<properties>
<dividerLocation value="158"/>
<dividerLocation value="144"/>
</properties>
<border type="none"/>
<children>
Expand Down Expand Up @@ -195,34 +195,39 @@
<properties>
<icon value="img/gui/edit/add.png"/>
<text value=""/>
<toolTipText value="Добавить материал"/>
</properties>
</component>
<component id="c562a" class="javax.swing.JButton" binding="removeMaterial">
<constraints/>
<properties>
<icon value="img/gui/edit/remove.png"/>
<text value=""/>
<toolTipText value="Удалить материал"/>
</properties>
</component>
<component id="ff71a" class="javax.swing.JButton" binding="editMaterialButton" default-binding="true">
<constraints/>
<properties>
<icon value="img/gui/edit/edit.png"/>
<text value=""/>
<toolTipText value="Редактировать выбранный материал"/>
</properties>
</component>
<component id="15392" class="javax.swing.JButton" binding="copyMaterialButton">
<constraints/>
<properties>
<icon value="img/gui/edit/copy.png"/>
<text value=""/>
<toolTipText value="Создать новый материал на основе существующего"/>
</properties>
</component>
<component id="f69ce" class="javax.swing.JButton" binding="createNewMaterialButton" default-binding="true">
<constraints/>
<properties>
<icon value="img/gui/materialNew16.png"/>
<text value=""/>
<toolTipText value="Создать новый материал"/>
</properties>
</component>
</children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,22 +451,27 @@ public List<MaterialListEntity> getEditedMaterials() {
addMaterialButton = new JButton();
addMaterialButton.setIcon(new ImageIcon(getClass().getResource("/img/gui/edit/add.png")));
addMaterialButton.setText("");
addMaterialButton.setToolTipText("Добавить материал");
toolBar1.add(addMaterialButton);
removeMaterial = new JButton();
removeMaterial.setIcon(new ImageIcon(getClass().getResource("/img/gui/edit/remove.png")));
removeMaterial.setText("");
removeMaterial.setToolTipText("Удалить материал");
toolBar1.add(removeMaterial);
editMaterialButton = new JButton();
editMaterialButton.setIcon(new ImageIcon(getClass().getResource("/img/gui/edit/edit.png")));
editMaterialButton.setText("");
editMaterialButton.setToolTipText("Редактировать выбранный материал");
toolBar1.add(editMaterialButton);
copyMaterialButton = new JButton();
copyMaterialButton.setIcon(new ImageIcon(getClass().getResource("/img/gui/edit/copy.png")));
copyMaterialButton.setText("");
copyMaterialButton.setToolTipText("Создать новый материал на основе существующего");
toolBar1.add(copyMaterialButton);
createNewMaterialButton = new JButton();
createNewMaterialButton.setIcon(new ImageIcon(getClass().getResource("/img/gui/materialNew16.png")));
createNewMaterialButton.setText("");
createNewMaterialButton.setToolTipText("Создать новый материал");
toolBar1.add(createNewMaterialButton);
}

Expand Down

0 comments on commit 4d6c8dc

Please sign in to comment.