use of com.jsql.view.swing.tab.TabbedPaneWheeled in project jsql-injection by ron190.
the class SqlEngine method getPanelConfiguration.
private JPanel getPanelConfiguration() {
JTabbedPane tabsConfiguration = new TabbedPaneWheeled(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
tabsConfiguration.addTab(I18nUtil.valueByKey("SQLENGINE_CHARACTERS_SLIDINGWINDOW"), new LightScrollPane(1, 0, 1, 0, TextareaWithColor.SLIDING_WINDOW.getText()));
tabsConfiguration.addTab(I18nUtil.valueByKey("SQLENGINE_ROWS_SLIDINGWINDOW"), new LightScrollPane(1, 0, 1, 0, TextareaWithColor.LIMIT.getText()));
tabsConfiguration.addTab("Limit start index", new LightScrollPane(1, 0, 1, 0, TextareaWithColor.LIMIT_BOUNDARY.getText()));
tabsConfiguration.addTab(I18nUtil.valueByKey("SQLENGINE_CAPACITY"), new LightScrollPane(1, 0, 1, 0, TextareaWithColor.CAPACITY.getText()));
tabsConfiguration.addTab(I18nUtil.valueByKey("SQLENGINE_CALIBRATOR"), new LightScrollPane(1, 0, 1, 0, TextareaWithColor.CALIBRATOR.getText()));
tabsConfiguration.addTab(I18nUtil.valueByKey("SQLENGINE_TRAPCANCELLER"), new LightScrollPane(1, 0, 1, 0, TextareaWithColor.FAILSAFE.getText()));
tabsConfiguration.addTab("End comment", new LightScrollPane(1, 0, 1, 0, TextareaWithColor.ENDING_COMMENT.getText()));
Stream.of("SQLENGINE_CHARACTERS_SLIDINGWINDOW", "SQLENGINE_ROWS_SLIDINGWINDOW", "SQLENGINE_CAPACITY", "SQLENGINE_CALIBRATOR", "SQLENGINE_TRAPCANCELLER").forEach(keyI18n -> {
var label = new JLabel(I18nUtil.valueByKey(keyI18n));
tabsConfiguration.setTabComponentAt(tabsConfiguration.indexOfTab(I18nUtil.valueByKey(keyI18n)), label);
I18nViewUtil.addComponentForKey(keyI18n, label);
});
var panelConfiguration = new JPanel(new BorderLayout());
panelConfiguration.add(tabsConfiguration, BorderLayout.CENTER);
panelConfiguration.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UiUtil.COLOR_COMPONENT_BORDER));
return panelConfiguration;
}
use of com.jsql.view.swing.tab.TabbedPaneWheeled in project jsql-injection by ron190.
the class SqlEngine method getPanelStrategy.
private JPanel getPanelStrategy() {
JTabbedPane tabsStrategy = new TabbedPaneWheeled(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
tabsStrategy.addTab(I18nUtil.valueByKey("SQLENGINE_NORMAL"), new LightScrollPane(1, 0, 1, 0, TextareaWithColor.INDICES.getText()));
var panelStrategy = new JPanel(new BorderLayout());
panelStrategy.add(tabsStrategy, BorderLayout.CENTER);
panelStrategy.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UiUtil.COLOR_COMPONENT_BORDER));
/* Error */
var panelError = new JPanel(new BorderLayout());
panelError.add(SqlEngine.tabbedPaneError, BorderLayout.CENTER);
tabsStrategy.addTab(I18nUtil.valueByKey("SQLENGINE_ERROR"), panelError);
/* Boolean */
JTabbedPane tabsBoolean = new TabbedPaneWheeled(SwingConstants.RIGHT, JTabbedPane.SCROLL_TAB_LAYOUT);
Stream.of(new SimpleEntry<>("AND mode", TextareaWithColor.MODE_AND.getText()), new SimpleEntry<>("OR mode", TextareaWithColor.MODE_OR.getText()), new SimpleEntry<>("Blind", TextareaWithColor.BLIND.getText()), new SimpleEntry<>("Time", TextareaWithColor.TIME.getText()), new SimpleEntry<>("Bit Test", TextareaWithColor.BIT_TEST.getText()), new SimpleEntry<>("Length Test", TextareaWithColor.LENGTH_TEST.getText())).forEach(entry -> tabsBoolean.addTab(entry.getKey(), new LightScrollPane(1, 0, 1, 0, entry.getValue())));
var panelBoolean = new JPanel(new BorderLayout());
panelBoolean.add(tabsBoolean, BorderLayout.CENTER);
tabsStrategy.addTab(I18nUtil.valueByKey("SQLENGINE_BOOLEAN"), panelBoolean);
/* Strategy */
Stream.of("SQLENGINE_NORMAL", "SQLENGINE_ERROR", "SQLENGINE_BOOLEAN").forEach(keyI18n -> {
var label = new JLabel(I18nUtil.valueByKey(keyI18n));
tabsStrategy.setTabComponentAt(tabsStrategy.indexOfTab(I18nUtil.valueByKey(keyI18n)), label);
I18nViewUtil.addComponentForKey(keyI18n, label);
});
return panelStrategy;
}
use of com.jsql.view.swing.tab.TabbedPaneWheeled in project jsql-injection by ron190.
the class SqlEngine method getPanelStructure.
private JPanel getPanelStructure() {
final var keyDatabases = "SQLENGINE_DATABASES";
final var keyTables = "SQLENGINE_TABLES";
final var keyColumns = "SQLENGINE_COLUMNS";
final var keyRows = "SQLENGINE_ROWS";
final var keyField = "SQLENGINE_FIELD";
final var keyFieldSeparator = "SQLENGINE_FIELDS_SEPARATOR";
JTabbedPane tabsStandard = new TabbedPaneWheeled(SwingConstants.RIGHT, JTabbedPane.SCROLL_TAB_LAYOUT);
JTabbedPane tabsSchema = new TabbedPaneWheeled(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
Stream.of(new SimpleEntry<>(keyDatabases, TextareaWithColor.DATABASE_DEFAULT.getText()), new SimpleEntry<>(keyTables, TextareaWithColor.TABLE_DEFAULT.getText()), new SimpleEntry<>(keyColumns, TextareaWithColor.COLUMN_DEFAULT.getText()), new SimpleEntry<>(keyRows, TextareaWithColor.QUERY_DEFAULT.getText()), new SimpleEntry<>(keyField, TextareaWithColor.FIELD_DEFAULT.getText()), new SimpleEntry<>(keyFieldSeparator, TextareaWithColor.CONCAT_DEFAULT.getText()), new SimpleEntry<>("SQLENGINE_METADATA", TextareaWithColor.INFO.getText())).forEach(entry -> {
tabsSchema.addTab(I18nUtil.valueByKey(entry.getKey()), new LightScrollPane(1, 0, 1, 0, entry.getValue()));
var label = new JLabel(I18nUtil.valueByKey(entry.getKey()));
tabsSchema.setTabComponentAt(tabsSchema.indexOfTab(I18nUtil.valueByKey(entry.getKey())), label);
I18nViewUtil.addComponentForKey(entry.getKey(), label);
});
JTabbedPane tabsZip = new TabbedPaneWheeled(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
Stream.of(new SimpleEntry<>(keyDatabases, TextareaWithColor.DATABASE_ZIP.getText()), new SimpleEntry<>(keyTables, TextareaWithColor.TABLE_ZIP.getText()), new SimpleEntry<>(keyColumns, TextareaWithColor.COLUMN_ZIP.getText()), new SimpleEntry<>(keyRows, TextareaWithColor.QUERY_ZIP.getText()), new SimpleEntry<>(keyField, TextareaWithColor.FIELD_ZIP.getText()), new SimpleEntry<>(keyFieldSeparator, TextareaWithColor.CONCAT_ZIP.getText())).forEach(entry -> {
tabsZip.addTab(I18nUtil.valueByKey(entry.getKey()), new LightScrollPane(1, 0, 1, 0, entry.getValue()));
var label = new JLabel(I18nUtil.valueByKey(entry.getKey()));
tabsZip.setTabComponentAt(tabsZip.indexOfTab(I18nUtil.valueByKey(entry.getKey())), label);
I18nViewUtil.addComponentForKey(entry.getKey(), label);
});
JTabbedPane tabsDios = new TabbedPaneWheeled(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
Stream.of(new SimpleEntry<>(keyDatabases, TextareaWithColor.DATABASE_DIOS.getText()), new SimpleEntry<>(keyTables, TextareaWithColor.TABLE_DIOS.getText()), new SimpleEntry<>(keyColumns, TextareaWithColor.COLUMN_DIOS.getText()), new SimpleEntry<>(keyRows, TextareaWithColor.QUERY_DIOS.getText()), new SimpleEntry<>(keyField, TextareaWithColor.FIELD_DIOS.getText()), new SimpleEntry<>(keyFieldSeparator, TextareaWithColor.CONCAT_DIOS.getText())).forEach(entry -> {
tabsDios.addTab(I18nUtil.valueByKey(entry.getKey()), new LightScrollPane(1, 0, 1, 0, entry.getValue()));
var label = new JLabel(I18nUtil.valueByKey(entry.getKey()));
tabsDios.setTabComponentAt(tabsDios.indexOfTab(I18nUtil.valueByKey(entry.getKey())), label);
I18nViewUtil.addComponentForKey(entry.getKey(), label);
});
Stream.of(new SimpleEntry<>("SQLENGINE_STANDARD", tabsSchema), new SimpleEntry<>("SQLENGINE_ZIP", tabsZip), new SimpleEntry<>("SQLENGINE_DIOS", tabsDios)).forEach(entry -> {
tabsStandard.addTab(I18nUtil.valueByKey(entry.getKey()), entry.getValue());
var label = new JLabel(I18nUtil.valueByKey(entry.getKey()));
tabsStandard.setTabComponentAt(tabsStandard.indexOfTab(I18nUtil.valueByKey(entry.getKey())), label);
I18nViewUtil.addComponentForKey(entry.getKey(), label);
});
var panelStructure = new JPanel(new BorderLayout());
panelStructure.add(tabsStandard, BorderLayout.CENTER);
panelStructure.setBorder(BorderFactory.createEmptyBorder());
return panelStructure;
}
use of com.jsql.view.swing.tab.TabbedPaneWheeled in project jsql-injection by ron190.
the class SqlEngine method getPanelFingerprinting.
private JPanel getPanelFingerprinting() {
JTabbedPane tabs = new TabbedPaneWheeled(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
tabs.addTab(I18nUtil.valueByKey("SQLENGINE_ORDER_BY"), new LightScrollPane(1, 0, 1, 0, TextareaWithColor.ORDER_BY.getText()));
tabs.addTab("Order by error", new LightScrollPane(1, 0, 1, 0, TextareaWithColor.ORDER_BY_ERROR_MESSAGE.getText()));
tabs.addTab("String error", new LightScrollPane(1, 0, 1, 0, TextareaWithColor.INCORRECT_STRING_ERROR_MESSAGE.getText()));
tabs.addTab("Truthy", new LightScrollPane(1, 0, 1, 0, TextareaWithColor.TRUTHY.getText()));
tabs.addTab("Falsy", new LightScrollPane(1, 0, 1, 0, TextareaWithColor.FALSY.getText()));
Stream.of("SQLENGINE_ORDER_BY").forEach(keyI18n -> {
var label = new JLabel(I18nUtil.valueByKey(keyI18n));
tabs.setTabComponentAt(tabs.indexOfTab(I18nUtil.valueByKey(keyI18n)), label);
I18nViewUtil.addComponentForKey(keyI18n, label);
});
var panel = new JPanel(new BorderLayout());
panel.add(tabs, BorderLayout.CENTER);
panel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UiUtil.COLOR_COMPONENT_BORDER));
return panel;
}
Aggregations