74 lines
2.3 KiB
Java
74 lines
2.3 KiB
Java
package _VisualDVM.GlobalData.Makefile.UI;
|
|
import Common.Database.Tables.DataSet;
|
|
import Common.MainModule_;
|
|
import Common.Visual.DataSetControlForm;
|
|
import Common.Visual.Menus.DataMenuBar;
|
|
import Common.Visual.Windows.Dialog.DBObjectDialog;
|
|
import _VisualDVM.Current;
|
|
import _VisualDVM.GlobalData.Makefile.Makefile;
|
|
import _VisualDVM.GlobalData.Module.UI.ModuleAnchestorFields;
|
|
import _VisualDVM.GlobalData.Module.UI.ModuleAnchestorForm;
|
|
import _VisualDVM.Passes.PassCode;
|
|
|
|
import javax.swing.*;
|
|
public class MakefilesForm extends DataSetControlForm<Makefile> {
|
|
public MakefilesForm(DataSet<?, Makefile> dataSource_in, JPanel mountPanel_in) {
|
|
super(dataSource_in, mountPanel_in);
|
|
}
|
|
@Override
|
|
protected Current CurrentName() {
|
|
return Current.Makefile;
|
|
}
|
|
@Override
|
|
protected boolean hasCheckBox() {
|
|
return true;
|
|
}
|
|
@Override
|
|
public String[] getUIColumnNames() {
|
|
return new String[]{
|
|
"Линковщик",
|
|
"Команда",
|
|
"Флаги"
|
|
};
|
|
}
|
|
@Override
|
|
public Object getFieldAt(Makefile object, int columnIndex) {
|
|
switch (columnIndex) {
|
|
case 2:
|
|
return object.getCompilerDescription();
|
|
case 3:
|
|
return object.command;
|
|
case 4:
|
|
return object.flags;
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
@Override
|
|
protected void AdditionalInitColumns() {
|
|
columns.get(0).setVisible(false);
|
|
}
|
|
@Override
|
|
public DataMenuBar createMenuBar() {
|
|
return new DataMenuBar(dataSource.getPluralDescription(),
|
|
PassCode.Compile,
|
|
PassCode.AddMakefile,
|
|
PassCode.EditMakefile,
|
|
PassCode.DeleteMakefile) {
|
|
{
|
|
addSeparator();
|
|
addPasses(PassCode.ShowMakefilePreview, PassCode.EditProjectCompilationMaxtime);
|
|
}
|
|
};
|
|
}
|
|
@Override
|
|
public boolean isObjectVisible(Makefile object) {
|
|
return super.isObjectVisible(object) &&
|
|
MainModule_.instance.matchCurrentID(Current.Machine, object.machine_id);
|
|
}
|
|
@Override
|
|
protected DBObjectDialog<Makefile, ModuleAnchestorFields> getDialog() {
|
|
return new ModuleAnchestorForm<>();
|
|
}
|
|
}
|