64 lines
2.3 KiB
Java
64 lines
2.3 KiB
Java
|
|
package _VisualDVM.GlobalData.Machine.UI;
|
||
|
|
import Common.Database.Tables.DataSet;
|
||
|
|
import Common.Visual.Controls.MenuBarButton;
|
||
|
|
import Common.Visual.DataSetControlForm;
|
||
|
|
import Common.Visual.Menus.DataMenuBar;
|
||
|
|
import _VisualDVM.Global;
|
||
|
|
import _VisualDVM.GlobalData.Machine.Machine;
|
||
|
|
import _VisualDVM.Passes.PassCode;
|
||
|
|
|
||
|
|
import javax.swing.*;
|
||
|
|
import java.awt.event.ActionEvent;
|
||
|
|
import java.awt.event.ActionListener;
|
||
|
|
public class MachinesForm extends DataSetControlForm<Machine> {
|
||
|
|
public MachinesForm(DataSet<?, Machine> dataSource_in, JPanel mountPanel_in) {
|
||
|
|
super(dataSource_in, mountPanel_in);
|
||
|
|
}
|
||
|
|
@Override
|
||
|
|
public boolean hasCheckBox() {
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
@Override
|
||
|
|
public String[] getUIColumnNames() {
|
||
|
|
return new String[]{"URL"};
|
||
|
|
}
|
||
|
|
@Override
|
||
|
|
public void ShowCurrentObject() throws Exception {
|
||
|
|
super.ShowCurrentObject();
|
||
|
|
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||
|
|
Global.mainModule.getUI().getCredentialsMenuBar().ShowMachine();
|
||
|
|
}
|
||
|
|
@Override
|
||
|
|
public void ShowNoCurrentObject() throws Exception {
|
||
|
|
super.ShowNoCurrentObject();
|
||
|
|
Global.mainModule.getUI().getMainWindow().getTestingWindow().ShowCurrentCompiler();
|
||
|
|
Global.mainModule.getUI().getCredentialsMenuBar().ShowNoMachine();
|
||
|
|
}
|
||
|
|
@Override
|
||
|
|
protected void AdditionalInitColumns() {
|
||
|
|
columns.get(0).setVisible(false);
|
||
|
|
}
|
||
|
|
@Override
|
||
|
|
public DataMenuBar createMenuBar() {
|
||
|
|
return new DataMenuBar(dataSource.getPluralDescription(),
|
||
|
|
PassCode.AddMachine,
|
||
|
|
PassCode.EditMachine,
|
||
|
|
PassCode.DeleteMachine) {
|
||
|
|
{
|
||
|
|
add(new MenuBarButton() {
|
||
|
|
{
|
||
|
|
setIcon("/Common/icons/SilverArrowUp.png");
|
||
|
|
setToolTipText("Свернуть");
|
||
|
|
addActionListener(new ActionListener() {
|
||
|
|
@Override
|
||
|
|
public void actionPerformed(ActionEvent e) {
|
||
|
|
Global.mainModule.getPass(PassCode.UpdateProperty).Do("collapseCredentials", true);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}, 0);
|
||
|
|
}
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|