proj_name stringclasses 131
values | relative_path stringlengths 30 228 | class_name stringlengths 1 68 | func_name stringlengths 1 48 | masked_class stringlengths 78 9.82k | func_body stringlengths 46 9.61k | len_input int64 29 2.01k | len_output int64 14 1.94k | total int64 55 2.05k | relevant_context stringlengths 0 38.4k |
|---|---|---|---|---|---|---|---|---|---|
gephi_gephi | gephi/modules/DBDrivers/src/main/java/org/gephi/io/database/drivers/PostgreSQLDriver.java | PostgreSQLDriver | equals | class PostgreSQLDriver implements SQLDriver {
public PostgreSQLDriver() {
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(PostgreSQLDriver.class.getName()).log(Level.SEVERE, null, ex);
}
}
@Override
pu... |
if (obj instanceof PostgreSQLDriver) {
return ((PostgreSQLDriver) obj).getPrefix().equals(getPrefix());
} else {
return false;
}
| 228 | 44 | 272 | <no_super_class> |
gephi_gephi | gephi/modules/DBDrivers/src/main/java/org/gephi/io/database/drivers/SQLServerDriver.java | SQLServerDriver | getConnection | class SQLServerDriver implements SQLDriver {
public SQLServerDriver() {
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
} catch (ClassNotFoundException ex) {
Logger.getLogger(MySQLDriver.class.getName()).log(Level.SEVERE, null, ex);
}
}
... |
//Bug #745414
if (!connectionUrl.contains(";databaseName=")) {
String dbname = connectionUrl.substring(connectionUrl.lastIndexOf('/') + 1);
String url = connectionUrl.substring(0, connectionUrl.lastIndexOf('/'));
connectionUrl = url + ";databaseName=" + dbname;
... | 260 | 111 | 371 | <no_super_class> |
gephi_gephi | gephi/modules/DBDrivers/src/main/java/org/gephi/io/database/drivers/SQLUtils.java | SQLUtils | getUrl | class SQLUtils {
public static SQLDriver getDriver(String prefix) {
for (SQLDriver driver : Lookup.getDefault().lookupAll(SQLDriver.class)) {
if (driver.getPrefix().equalsIgnoreCase(prefix)) {
return driver;
}
}
return null;
}
public static S... |
String res = "jdbc:";
res += driver != null ? driver.getPrefix() : "";
res += "://";
res += host != null ? host : "";
res += ":";
res += port != 0 ? port : "";
res += dbname != null ? "/" + dbname : "";
return res;
| 116 | 89 | 205 | <no_super_class> |
gephi_gephi | gephi/modules/DBDrivers/src/main/java/org/gephi/io/database/drivers/SQLiteDriver.java | SQLiteDriver | equals | class SQLiteDriver implements SQLDriver {
public SQLiteDriver() {
try {
// load the sqlite-JDBC driver using the current class loader
Class.forName("org.sqlite.JDBC");
} catch (ClassNotFoundException ex) {
Logger.getLogger(SQLiteDriver.class.getName()).log(Level.... |
if (obj instanceof SQLiteDriver) {
return ((SQLiteDriver) obj).getPrefix().equals(getPrefix());
} else {
return false;
}
| 296 | 45 | 341 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryAPI/src/main/java/org/gephi/datalab/impl/DataTablesControllerImpl.java | DataTablesControllerImpl | isShowEdgesNodesLabels | class DataTablesControllerImpl implements DataTablesController {
private DataTablesEventListener listener;
@Override
public DataTablesEventListener getDataTablesEventListener() {
return listener;
}
@Override
public void setDataTablesEventListener(DataTablesEventListener listener) {
... |
if (listener != null) {
return listener.isShowEdgesNodesLabels();
} else {
return false;
}
| 1,278 | 40 | 1,318 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/ClearColumnData.java | ClearColumnData | canManipulateColumn | class ClearColumnData implements AttributeColumnsManipulator {
@Override
public void execute(Table table, Column column) {
if (JOptionPane.showConfirmDialog(null,
NbBundle.getMessage(ClearColumnData.class, "ClearColumnData.confirmation.message", column.getTitle()),
getName(), JO... |
boolean result;
AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
result = ac.canClearColumnData(column);
return result && ac.getTableRowsCount(table) > 0;//Also make sure that there is at least 1 row
| 374 | 73 | 447 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/ColumnValuesFrequency.java | ColumnValuesFrequency | writePieChart | class ColumnValuesFrequency implements AttributeColumnsManipulator {
public static final int MAX_PIE_CHART_CATEGORIES = 100;
@Override
public void execute(Table table, Column column) {
}
@Override
public String getName() {
return NbBundle.getMessage(ColumnValuesFrequency.class, "Colum... |
TempDir tempDir = TempDirUtils.createTempDir();
String fileName = "frequencies-pie-chart.png";
File file = tempDir.createFile(fileName);
String imageFile = "<center><img src=\"file:" + file.getAbsolutePath() + "\"</img></center>";
ChartUtilities.saveChartAsPNG(file, chart, dime... | 1,475 | 145 | 1,620 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/ConvertColumnToDynamic.java | ConvertColumnToDynamic | execute | class ConvertColumnToDynamic implements AttributeColumnsManipulator {
private String title;
private double low, high;
private boolean replaceColumn;
@Override
public void execute(Table table, Column column) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
retu... |
if (replaceColumn) {
Lookup.getDefault().lookup(AttributeColumnsController.class)
.convertAttributeColumnToDynamic(table, column, low, high);
} else {
Lookup.getDefault().lookup(AttributeColumnsController.class)
.convertAttributeColumnToNewD... | 637 | 99 | 736 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/CopyDataToOtherColumn.java | CopyDataToOtherColumn | execute | class CopyDataToOtherColumn implements AttributeColumnsManipulator {
Column targetColumn;
@Override
public void execute(Table table, Column column) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return NbBundle.getMessage(CopyDataToOtherColumn.class, "CopyDataToOtherColumn.nam... |
if (targetColumn != null && targetColumn != column) {
Lookup.getDefault().lookup(AttributeColumnsController.class)
.copyColumnDataToOtherColumn(table, column, targetColumn);
Lookup.getDefault().lookup(DataTablesController.class).refreshCurrentTable();
}
| 320 | 80 | 400 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/CreateBooleanMatchesColumn.java | CreateBooleanMatchesColumn | execute | class CreateBooleanMatchesColumn extends GeneralCreateColumnFromRegex {
@Override
public void execute(Table table, Column column) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return NbBundle.getMessage(CreateBooleanMatchesColumn.class, "CreateBooleanMatchesColumn.name");
}
... |
if (pattern != null) {
Lookup.getDefault().lookup(AttributeColumnsController.class)
.createBooleanMatchesColumn(table, column, title, pattern);
}
| 367 | 50 | 417 | <methods>public non-sealed void <init>() ,public java.util.regex.Pattern getPattern() ,public java.lang.String getTitle() ,public void setPattern(java.util.regex.Pattern) ,public void setTitle(java.lang.String) <variables>protected java.util.regex.Pattern pattern,protected java.lang.String title |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/CreateFoundGroupsListColumn.java | CreateFoundGroupsListColumn | canManipulateColumn | class CreateFoundGroupsListColumn extends GeneralCreateColumnFromRegex {
@Override
public void execute(Table table, Column column) {
if (pattern != null) {
Lookup.getDefault().lookup(AttributeColumnsController.class)
.createFoundGroupsListColumn(table, column, title, pattern... |
AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
return ac.getTableRowsCount(table) > 0;//Make sure that there is at least 1 row
| 372 | 52 | 424 | <methods>public non-sealed void <init>() ,public java.util.regex.Pattern getPattern() ,public java.lang.String getTitle() ,public void setPattern(java.util.regex.Pattern) ,public void setTitle(java.lang.String) <variables>protected java.util.regex.Pattern pattern,protected java.lang.String title |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/DeleteColumn.java | DeleteColumn | execute | class DeleteColumn implements AttributeColumnsManipulator {
@Override
public void execute(Table table, Column column) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return NbBundle.getMessage(DeleteColumn.class, "DeleteColumn.name");
}
@Override
public String getDescri... |
if (JOptionPane.showConfirmDialog(null,
NbBundle.getMessage(ClearColumnData.class, "DeleteColumn.confirmation.message", column.getTitle()),
getName(), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
Lookup.getDefault().lookup(AttributeColumnsController.class).deleteA... | 268 | 127 | 395 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/FillColumnWithValue.java | FillColumnWithValue | execute | class FillColumnWithValue implements AttributeColumnsManipulator {
@Override
public void execute(Table table, Column column) {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return NbBundle.getMessage(FillColumnWithValue.class, "FillColumnWithValue.name");
}
@Override
pu... |
String value = JOptionPane.showInputDialog(null,
NbBundle.getMessage(FillColumnWithValue.class, "FillColumnWithValue.inputDialog.text"), getName(),
JOptionPane.QUESTION_MESSAGE);
if (value != null) {
Lookup.getDefault().lookup(AttributeColumnsController.class).fillCo... | 279 | 124 | 403 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/NumberColumnStatisticsReport.java | NumberColumnStatisticsReport | getColumnNumbers | class NumberColumnStatisticsReport implements AttributeColumnsManipulator {
@Override
public void execute(Table table, Column column) {
}
@Override
public String getName() {
return getMessage("NumberColumnStatisticsReport.name");
}
@Override
public String getDescription() {
... |
AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
Number[] columnNumbers = ac.getColumnNumbers(table, column);
return columnNumbers;
| 409 | 52 | 461 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/AverageNumber.java | AverageNumber | canExecute | class AverageNumber implements AttributeColumnsMergeStrategy, GeneralColumnTitleChooser {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
}
@O... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 426 | 48 | 474 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/BooleanLogicOperations.java | BooleanLogicOperations | canExecute | class BooleanLogicOperations implements AttributeColumnsMergeStrategy {
private Table table;
private Column[] columns;
private String newColumnTitle;
private BooleanOperations[] booleanOperations;
@Override
public void setup(Table table, Column[] columns) {
this.columns = columns;
... |
for (Column column : columns) {
if (column.getTypeClass() != Boolean.class) {
return false;
}
}
return true;
| 520 | 47 | 567 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/CreateTimeInterval.java | CreateTimeInterval | execute | class CreateTimeInterval implements AttributeColumnsMergeStrategy {
private Table table;
private Column[] columns;
private Column startColumn, endColumn;
private boolean parseNumbers = true;
//Number mode:
private double startNumber, endNumber;
//Date mode:
private SimpleDateFormat date... |
AttributeColumnsMergeStrategiesController ac =
Lookup.getDefault().lookup(AttributeColumnsMergeStrategiesController.class);
if (parseNumbers) {
ac.mergeNumericColumnsToTimeInterval(table, startColumn, endColumn, startNumber, endNumber);
} else {
ac.mergeDateC... | 842 | 109 | 951 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/FirstQuartileNumber.java | FirstQuartileNumber | canExecute | class FirstQuartileNumber implements AttributeColumnsMergeStrategy, GeneralColumnTitleChooser {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
}
... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 423 | 47 | 470 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/InterQuartileRangeNumber.java | InterQuartileRangeNumber | canExecute | class InterQuartileRangeNumber implements AttributeColumnsMergeStrategy, GeneralColumnTitleChooser {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 429 | 47 | 476 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/JoinNumberColumns.java | JoinNumberColumns | canExecute | class JoinNumberColumns implements AttributeColumnsMergeStrategy, GeneralColumnTitleChooser {
private static final String SEPARATOR = ",";
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table ... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 450 | 47 | 497 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/JoinWithSeparator.java | JoinWithSeparator | setup | class JoinWithSeparator implements AttributeColumnsMergeStrategy {
public static final String SEPARATOR_SAVED_PREFERENCES = "JoinWithSeparator_Separator";
private static final String DEFAULT_SEPARATOR = ", ";
private Table table;
private Column[] columns;
private String newColumnTitle, separator;
... |
this.table = table;
this.columns = columns;
separator =
NbPreferences.forModule(JoinWithSeparator.class).get(SEPARATOR_SAVED_PREFERENCES, DEFAULT_SEPARATOR);
| 540 | 63 | 603 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/MaximumNumber.java | MaximumNumber | canExecute | class MaximumNumber implements AttributeColumnsMergeStrategy, GeneralColumnTitleChooser {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
}
@... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 432 | 47 | 479 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/MedianNumber.java | MedianNumber | canExecute | class MedianNumber implements AttributeColumnsMergeStrategy, GeneralColumnTitleChooser {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
}
@O... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 436 | 47 | 483 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/MinimumNumber.java | MinimumNumber | canExecute | class MinimumNumber implements AttributeColumnsMergeStrategy {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
}
@Override
public void ex... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 413 | 47 | 460 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/SumNumbers.java | SumNumbers | canExecute | class SumNumbers implements AttributeColumnsMergeStrategy, GeneralColumnTitleChooser {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
}
@Ove... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 431 | 47 | 478 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/ThirdQuartileNumber.java | ThirdQuartileNumber | canExecute | class ThirdQuartileNumber implements AttributeColumnsMergeStrategy {
private Table table;
private Column[] columns;
private String columnTitle;
@Override
public void setup(Table table, Column[] columns) {
this.table = table;
this.columns = columns;
}
@Override
public v... |
for (Column column : columns) {
if (!AttributeUtils.isNumberType(column.getTypeClass())) {
return false;
}
}
return true;
| 408 | 47 | 455 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/ui/BooleanLogicOperationsUI.java | BooleanLogicOperationsUI | prepareColumnsAndOperations | class BooleanLogicOperationsUI extends javax.swing.JPanel implements ManipulatorUI {
private BooleanLogicOperations manipulator;
private JComboBox[] operationSelectors;
private Table table;
private DialogControls dialogControls;
// Variables declaration - do not modify//GEN-BEGIN:variables
priv... |
Column[] columns = manipulator.getColumns();
operationSelectors = new JComboBox[columns.length - 1];
JLabel columnLabel;
for (int i = 0; i < columns.length; i++) {
columnLabel = new JLabel(columns[i].getTitle());
columnLabel.setHorizontalAlignment(JLabel.CENTER)... | 1,657 | 149 | 1,806 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/ui/GeneralColumnTitleChooserUI.java | GeneralColumnTitleChooserUI | initComponents | class GeneralColumnTitleChooserUI extends javax.swing.JPanel implements ManipulatorUI {
private GeneralColumnTitleChooser manipulator;
private DialogControls dialogControls;
private Table table;
private String displayName;
// Variables declaration - do not modify//GEN-BEGIN:variables
private ja... |
titleLabel = new javax.swing.JLabel();
titleTextField = new javax.swing.JTextField();
titleLabel.setText(org.openide.util.NbBundle
.getMessage(GeneralColumnTitleChooserUI.class, "GeneralColumnTitleChooserUI.titleLabel.text")); // NOI18N
titleTextField.setText(org.openide.... | 720 | 473 | 1,193 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/merge/ui/JoinWithSeparatorUI.java | JoinWithSeparatorUI | initComponents | class JoinWithSeparatorUI extends javax.swing.JPanel implements ManipulatorUI {
private JoinWithSeparator manipulator;
private DialogControls dialogControls;
private Table table;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel separatorLabel;
private jav... |
titleLabel = new javax.swing.JLabel();
titleTextField = new javax.swing.JTextField();
separatorLabel = new javax.swing.JLabel();
separatorText = new javax.swing.JTextField();
titleLabel.setText(org.openide.util.NbBundle
.getMessage(JoinWithSeparatorUI.class, "JoinW... | 763 | 808 | 1,571 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/ui/ColumnValuesFrequencyUI.java | ColumnValuesFrequencyUI | unSetup | class ColumnValuesFrequencyUI extends javax.swing.JPanel implements AttributeColumnsManipulatorUI {
private ColumnValuesFrequency manipulator;
private Table table;
private Column column;
private Map<Object, Integer> valuesFrequencies;
private JFreeChart pieChart;
private JFreeChartDialog pieCha... |
if (reportDialog != null) {
reportDialog.dispose();
}
if (pieChartDialog != null) {
pieChartDialog.dispose();
}
| 1,520 | 49 | 1,569 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/ui/CopyDataToOtherColumnUI.java | CopyDataToOtherColumnUI | initComponents | class CopyDataToOtherColumnUI extends javax.swing.JPanel implements AttributeColumnsManipulatorUI {
CopyDataToOtherColumn manipulator;
Column[] columns;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JComboBox columnsComboBox;
private javax.swing.JLabel descriptio... |
descriptionLabel = new javax.swing.JLabel();
columnsComboBox = new javax.swing.JComboBox();
sourceColumnLabel = new javax.swing.JLabel();
descriptionLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
descriptionLabel.setText(org.openide.util.NbBundle
... | 644 | 601 | 1,245 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/columns/ui/DuplicateColumnUI.java | DuplicateColumnUI | initComponents | class DuplicateColumnUI extends javax.swing.JPanel implements AttributeColumnsManipulatorUI {
private DuplicateColumn manipulator;
private Table table;
private DialogControls dialogControls;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel descriptionLabel;
... |
titleLabel = new javax.swing.JLabel();
titleTextField = new javax.swing.JTextField();
typeLabel = new javax.swing.JLabel();
typeComboBox = new javax.swing.JComboBox();
descriptionLabel = new javax.swing.JLabel();
titleLabel.setText(org.openide.util.NbBundle
... | 912 | 968 | 1,880 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/ClearEdgesData.java | ClearEdgesData | setup | class ClearEdgesData extends BasicEdgesManipulator implements GeneralColumnsChooser {
private Edge[] edges;
private Column[] columnsToClearData;
@Override
public void setup(Edge[] edges, Edge clickedEdge) {<FILL_FUNCTION_BODY>}
@Override
public void execute() {
if (columnsToClearData.... |
this.edges = edges;
AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
ArrayList<Column> columnsToClearDataList = new ArrayList<>();
for (Column column : Lookup.getDefault().lookup(GraphController.class).getGraphModel().getEdgeTable()) {
... | 520 | 134 | 654 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/CopyEdgeDataToOtherEdges.java | CopyEdgeDataToOtherEdges | setup | class CopyEdgeDataToOtherEdges extends BasicEdgesManipulator implements GeneralColumnsAndRowChooser {
private Edge clickedEdge;
private Edge[] edges;
private Column[] columnsToCopyData;
@Override
public void setup(Edge[] edges, Edge clickedEdge) {<FILL_FUNCTION_BODY>}
@Override
public voi... |
this.clickedEdge = clickedEdge;
this.edges = edges;
AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
ArrayList<Column> columnsToCopyDataList = new ArrayList<>();
for (Column column : Lookup.getDefault().lookup(GraphController.class).g... | 637 | 145 | 782 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/DeleteEdges.java | DeleteEdges | getName | class DeleteEdges extends BasicEdgesManipulator {
private Edge[] edges;
@Override
public void setup(Edge[] edges, Edge clickedEdge) {
this.edges = edges;
}
@Override
public void execute() {
if (JOptionPane
.showConfirmDialog(null, NbBundle.getMessage(DeleteEdges.cl... |
if (edges.length > 1) {
return NbBundle.getMessage(DeleteEdges.class, "DeleteEdges.name.multiple");
} else {
return NbBundle.getMessage(DeleteEdges.class, "DeleteEdges.name.single");
}
| 355 | 72 | 427 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/DeleteEdgesWithNodes.java | DeleteEdgesWithNodes | getName | class DeleteEdgesWithNodes extends BasicEdgesManipulator {
private Edge[] edges;
private boolean deleteSource, deleteTarget;
@Override
public void setup(Edge[] edges, Edge clickedEdge) {
this.edges = edges;
}
@Override
public void execute() {
GraphElementsController gec = ... |
if (edges.length > 1) {
return NbBundle.getMessage(DeleteEdgesWithNodes.class, "DeleteEdgesWithNodes.name.multiple");
} else {
return NbBundle.getMessage(DeleteEdgesWithNodes.class, "DeleteEdgesWithNodes.name.single");
}
| 363 | 80 | 443 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/OpenInEditEdgeWindow.java | OpenInEditEdgeWindow | getName | class OpenInEditEdgeWindow extends BasicEdgesManipulator {
Edge[] edges;
@Override
public void setup(Edge[] edges, Edge clickedEdge) {
this.edges = edges;
}
@Override
public void execute() {
EditWindowController edc = Lookup.getDefault().lookup(EditWindowController.class);
... |
if (edges.length > 1) {
return NbBundle.getMessage(OpenInEditEdgeWindow.class, "OpenInEditEdgeWindow.name.multiple");
} else {
return NbBundle.getMessage(OpenInEditEdgeWindow.class, "OpenInEditEdgeWindow.name");
}
| 359 | 78 | 437 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/SelectNodesOnTable.java | SelectNodesOnTable | execute | class SelectNodesOnTable extends BasicEdgesManipulator {
private Edge clickedEdge;
@Override
public void setup(Edge[] edges, Edge clickedEdge) {
this.clickedEdge = clickedEdge;
}
@Override
public void execute() {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
... |
Node[] nodes = new Node[] {clickedEdge.getSource(), clickedEdge.getTarget()};
DataTablesController dtc = Lookup.getDefault().lookup(DataTablesController.class);
dtc.setNodeTableSelection(nodes);
dtc.selectNodesTable();
| 281 | 73 | 354 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/SelectOnGraph.java | SelectOnGraph | execute | class SelectOnGraph extends BasicEdgesManipulator {
private Edge[] edges;
private Edge clickedEdge;
@Override
public void setup(Edge[] nodes, Edge clickedEdge) {
this.edges = nodes;
this.clickedEdge = clickedEdge;
}
@Override
public void execute() {<FILL_FUNCTION_BODY>}
... |
VisualizationController vc = Lookup.getDefault().lookup(VisualizationController.class);
if (vc != null) {
vc.selectEdges(edges);
vc.centerOnEdge(clickedEdge);
}
| 292 | 64 | 356 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/edges/ui/DeleteEdgesWithNodesUI.java | DeleteEdgesWithNodesUI | initComponents | class DeleteEdgesWithNodesUI extends javax.swing.JPanel implements ManipulatorUI {
private static final String DELETE_SOURCE_SAVED_PREFERENCES = "DeleteEdgesWithNodesUI_deleteSource";
private static final String DELETE_TARGET_SAVED_PREFERENCES = "DeleteEdgesWithNodesUI_deleteTarget";
private DeleteEdgesWith... |
deleteSource = new javax.swing.JCheckBox();
deleteTarget = new javax.swing.JCheckBox();
descriptionLabel = new javax.swing.JLabel();
deleteSource.setSelected(true);
deleteSource.setText(org.openide.util.NbBundle
.getMessage(DeleteEdgesWithNodesUI.class, "DeleteEdge... | 687 | 644 | 1,331 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/AddEdgeToGraph.java | AddEdgeToGraph | getUI | class AddEdgeToGraph implements GeneralActionsManipulator {
private Node source = null, target = null;
private boolean directed;
private Object edgeTypeLabel = null;
private GraphModel graphModel = null;
@Override
public void execute() {
if (source != null && target != null) {... |
GraphModel currentGraphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();
if (graphModel != null && graphModel !=
currentGraphModel) {//If graph model has changed since last execution, change default mode for edges to create in UI, else keep this parameter across ... | 597 | 152 | 749 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/AddNodeToGraph.java | AddNodeToGraph | execute | class AddNodeToGraph implements GeneralActionsManipulator {
@Override
public void execute() {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return NbBundle.getMessage(AddNodeToGraph.class, "AddNodeToGraph.name");
}
@Override
public String getDescription() {
retu... |
String label = JOptionPane
.showInputDialog(null, NbBundle.getMessage(AddNodeToGraph.class, "AddNodeToGraph.dialog.text"),
NbBundle.getMessage(AddNodeToGraph.class, "AddNodeToGraph.name"), JOptionPane.QUESTION_MESSAGE);
if (label != null) {
Node node = Lookup.get... | 230 | 144 | 374 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/ClearEdges.java | ClearEdges | execute | class ClearEdges implements PluginGeneralActionsManipulator {
public static final String DELETE_DIRECTED_SAVED_PREFERENCES = "ClearEdges_deleteDirected";
public static final String DELETE_UNDIRECTED_SAVED_PREFERENCES = "ClearEdges_deleteUndirected";
private boolean deleteDirected, deleteUndirected;
pu... |
GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
Graph graph = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getGraph();
List<Edge> edges = new ArrayList<>();
for (Edge edge : graph.getEdges().toArray()) {
if (edge... | 556 | 162 | 718 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/ClearGraph.java | ClearGraph | execute | class ClearGraph implements PluginGeneralActionsManipulator {
@Override
public void execute() {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
return NbBundle.getMessage(ClearGraph.class, "ClearGraph.name");
}
@Override
public String getDescription() {
return "";... |
if (JOptionPane.showConfirmDialog(null, NbBundle.getMessage(ClearGraph.class, "ClearGraph.dialog.text"),
NbBundle.getMessage(ClearGraph.class, "ClearGraph.name"), JOptionPane.YES_NO_OPTION,
JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
Lookup.getDefault().lookup(... | 249 | 120 | 369 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/ManageColumnEstimators.java | ManageColumnEstimators | getColumns | class ManageColumnEstimators implements PluginGeneralActionsManipulator {
private Column[] columns;
private Estimator[] estimators;
@Override
public void execute() {
for (int i = 0; i < columns.length; i++) {
Column column = columns[i];
Estimator estimator = estimators[... |
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();
Table table;
if (Lookup.getDefault().lookup(DataTablesController.class).isNodeTableMode()) {
table = graphModel.getNodeTable();
} else {
table = graphModel.getEdgeTable();... | 420 | 157 | 577 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/MergeNodeDuplicates.java | MergeNodeDuplicates | getUI | class MergeNodeDuplicates implements PluginGeneralActionsManipulator {
public static final String DELETE_MERGED_NODES_SAVED_PREFERENCES = "MergeNodeDuplicates_DeleteMergedNodes";
public static final String CASE_SENSITIVE_SAVED_PREFERENCES = "MergeNodeDuplicates_CaseSensitive";
/**
* To be set by the U... |
Table nodeTable = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getNodeTable();
List<Column> columnsList = new ArrayList<>();
for (Column column : nodeTable) {
if (!column.isReadOnly()) {
columnsList.add(column);
}
}
c... | 899 | 229 | 1,128 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/SearchReplace.java | SearchReplace | canExecute | class SearchReplace implements GeneralActionsManipulator {
@Override
public void execute() {
SearchReplaceUI ui = Lookup.getDefault().lookup(SearchReplaceUI.class);
if (ui.isActive()) {
return;//Do not open more than one Search/Replace dialog
}
if (Lookup.getDefault(... |
Table currentTable = getCurrentTable();
return currentTable != null &&
Lookup.getDefault().lookup(AttributeColumnsController.class).getTableRowsCount(currentTable) >
0;//Make sure that there is at least 1 row
| 574 | 63 | 637 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/ui/ClearEdgesUI.java | ClearEdgesUI | initComponents | class ClearEdgesUI extends javax.swing.JPanel implements ManipulatorUI {
ClearEdges manipulator;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox deleteDirectedCheckbox;
private javax.swing.JCheckBox deleteUndirectedChekbox;
private javax.swing.JLabel descr... |
deleteDirectedCheckbox = new javax.swing.JCheckBox();
deleteUndirectedChekbox = new javax.swing.JCheckBox();
descriptionLabel = new javax.swing.JLabel();
deleteDirectedCheckbox.setText(org.openide.util.NbBundle
.getMessage(ClearEdgesUI.class, "ClearEdgesUI.deleteDirectedCh... | 596 | 653 | 1,249 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/ui/ManageColumnEstimatorsUI.java | EstimatorWrapper | toString | class EstimatorWrapper {
private final Estimator estimator;
public EstimatorWrapper(Estimator estimator) {
this.estimator = estimator;
}
@Override
public String toString() {<FILL_FUNCTION_BODY>}
@Override
public int hashCode() {
int has... |
if (estimator == null) {
return "---";
}
try {
return NbBundle.getMessage(ManageColumnEstimatorsUI.class,
"ManageColumnEstimatorsUI.estimator." + estimator.name());
} catch (MissingResourceException missingResourceExce... | 235 | 97 | 332 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/general/ui/MergeNodeDuplicatesUI.java | StrategyInfoLabel | mouseExited | class StrategyInfoLabel extends JLabel {
private final int strategyIndex;
public StrategyInfoLabel(int strategyIndex) {
this.strategyIndex = strategyIndex;
setIcon(INFO_LABELS_ICON);
prepareRichTooltip();
}
public void refreshEnabledState() {
... |
if (richTooltip != null) {
richTooltip.hideTooltip();
richTooltip = null;
}
| 409 | 36 | 445 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/ClearNodesData.java | ClearNodesData | getName | class ClearNodesData extends BasicNodesManipulator implements GeneralColumnsChooser {
private Node[] nodes;
private Column[] columnsToClearData;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.nodes = nodes;
AttributeColumnsController ac = Lookup.getDefault().lookup(... |
if (nodes.length > 1) {
return NbBundle.getMessage(ClearNodesData.class, "ClearNodesData.name.multiple");
} else {
return NbBundle.getMessage(ClearNodesData.class, "ClearNodesData.name.single");
}
| 569 | 71 | 640 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/CopyNodeDataToOtherNodes.java | CopyNodeDataToOtherNodes | canExecute | class CopyNodeDataToOtherNodes extends BasicNodesManipulator implements GeneralColumnsAndRowChooser {
private Node clickedNode;
private Node[] nodes;
private Column[] columnsToCopyData;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.clickedNode = clickedNode;
th... |
return nodes.length > 1;//At least 2 nodes to copy data from one to the other.
| 743 | 27 | 770 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/CopyNodes.java | CopyNodes | execute | class CopyNodes extends BasicNodesManipulator {
private Node[] nodes;
private int copies = 1;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.nodes = nodes;
}
@Override
public void execute() {<FILL_FUNCTION_BODY>}
@Override
public String getName() {
... |
GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
for (int i = 0; i < copies; i++) {
gec.duplicateNodes(nodes);
}
| 408 | 57 | 465 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/DeleteNodes.java | DeleteNodes | getName | class DeleteNodes extends BasicNodesManipulator {
private Node[] nodes;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.nodes = nodes;
}
@Override
public void execute() {
if (JOptionPane
.showConfirmDialog(null, NbBundle.getMessage(DeleteNodes.cl... |
if (nodes.length > 1) {
return NbBundle.getMessage(DeleteNodes.class, "DeleteNodes.name.multiple");
} else {
return NbBundle.getMessage(DeleteNodes.class, "DeleteNodes.name.single");
}
| 348 | 67 | 415 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/Free.java | Free | getName | class Free extends BasicNodesManipulator {
private Node[] nodes;
private Node clickedNode;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.nodes = nodes;
this.clickedNode = clickedNode;
}
@Override
public void execute() {
GraphElementsController ... |
if (nodes.length > 1) {
return NbBundle.getMessage(Settle.class, "Free.name.multiple");
} else {
return NbBundle.getMessage(Settle.class, "Free.name.single");
}
| 353 | 65 | 418 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/LinkNodes.java | LinkNodes | setup | class LinkNodes extends BasicNodesManipulator {
private static boolean directed;
private static GraphModel graphModel;
private Node[] nodes;
private Node sourceNode;
@Override
public void setup(Node[] nodes, Node clickedNode) {<FILL_FUNCTION_BODY>}
@Override
public void exe... |
this.nodes = nodes;
this.sourceNode =
clickedNode;//Choose clicked node as source by default (but the user can select it or other one in the UI)
GraphModel currentGraphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();
if (graphModel !=
... | 623 | 175 | 798 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/MergeNodes.java | MergeNodes | setup | class MergeNodes extends BasicNodesManipulator {
public static final String DELETE_MERGED_NODES_SAVED_PREFERENCES = "MergeNodes_DeleteMergedNodes";
private Node[] nodes;
private Node selectedNode;
private Column[] columns;
private AttributeRowsMergeStrategy[] mergeStrategies;
private boolean de... |
this.nodes = nodes;
selectedNode = clickedNode != null ? clickedNode : nodes[0];
Table nodeTable = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getNodeTable();
List<Column> columnsList = new ArrayList<>();
for (Column column : nodeTable) {
if (!... | 736 | 194 | 930 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/OpenInEditNodeWindow.java | OpenInEditNodeWindow | getName | class OpenInEditNodeWindow extends BasicNodesManipulator {
private Node[] nodes;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.nodes = nodes;
}
@Override
public void execute() {
EditWindowController edc = Lookup.getDefault().lookup(EditWindowController.cla... |
if (nodes.length > 1) {
return NbBundle.getMessage(OpenInEditNodeWindow.class, "OpenInEditNodeWindow.name.multiple");
} else {
return NbBundle.getMessage(OpenInEditNodeWindow.class, "OpenInEditNodeWindow.name");
}
| 356 | 77 | 433 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/SelectEdgesOnTable.java | SelectEdgesOnTable | canExecute | class SelectEdgesOnTable extends BasicNodesManipulator {
private Node node;
private Edge[] edges;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.node = clickedNode;
if (Lookup.getDefault().lookup(GraphElementsController.class).isNodeInGraph(node)) {
this... |
return edges != null;//Do not enable if the node has no edges.
| 389 | 22 | 411 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/SelectNeighboursOnTable.java | SelectNeighboursOnTable | setup | class SelectNeighboursOnTable extends BasicNodesManipulator {
private Node node;
private Node[] neighbours;
@Override
public void setup(Node[] nodes, Node clickedNode) {<FILL_FUNCTION_BODY>}
@Override
public void execute() {
Lookup.getDefault().lookup(DataTablesController.class).setNod... |
this.node = clickedNode;
if (Lookup.getDefault().lookup(GraphElementsController.class).isNodeInGraph(node)) {
this.neighbours = Lookup.getDefault().lookup(GraphElementsController.class).getNodeNeighbours(node);
}
| 327 | 74 | 401 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/SelectOnGraph.java | SelectOnGraph | execute | class SelectOnGraph extends BasicNodesManipulator {
private Node[] nodes;
private Node clickedNode;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.nodes = nodes;
this.clickedNode = clickedNode;
}
@Override
public void execute() {<FILL_FUNCTION_BODY>}
... |
VisualizationController vc = Lookup.getDefault().lookup(VisualizationController.class);
if (vc != null) {
vc.selectNodes(nodes);
vc.centerOnNode(clickedNode);
}
| 290 | 62 | 352 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/Settle.java | Settle | getName | class Settle extends BasicNodesManipulator {
private Node[] nodes;
private Node clickedNode;
@Override
public void setup(Node[] nodes, Node clickedNode) {
this.nodes = nodes;
this.clickedNode = clickedNode;
}
@Override
public void execute() {
GraphElementsControlle... |
if (nodes.length > 1) {
return NbBundle.getMessage(Settle.class, "Settle.name.multiple");
} else {
return NbBundle.getMessage(Settle.class, "Settle.name.single");
}
| 354 | 67 | 421 | <methods>public non-sealed void <init>() ,public java.lang.Integer getMnemonicKey() ,public org.gephi.datalab.spi.ContextMenuItemManipulator[] getSubItems() ,public boolean isAvailable() <variables> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/ui/CopyNodesUI.java | CopyNodesUI | initComponents | class CopyNodesUI extends javax.swing.JPanel implements ManipulatorUI {
private CopyNodes manipulator;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JSpinner copiesSpinner;
private javax.swing.JLabel descriptionLabel;
// End of variables declaration//GEN-END:vari... |
descriptionLabel = new javax.swing.JLabel();
copiesSpinner = new javax.swing.JSpinner();
descriptionLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
descriptionLabel.setText(
org.openide.util.NbBundle.getMessage(CopyNodesUI.class, "CopyNodesUI.descriptionLa... | 501 | 502 | 1,003 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/ui/LinkNodesUI.java | LinkNodesUI | initComponents | class LinkNodesUI extends javax.swing.JPanel implements ManipulatorUI {
private LinkNodes manipulator;
private Node[] nodes;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel descriptionLabel;
private javax.swing.JRadioButton directedEdge;
private javax.sw... |
edgeTypeButtonGroup = new javax.swing.ButtonGroup();
descriptionLabel = new javax.swing.JLabel();
directedEdge = new javax.swing.JRadioButton();
undirectedEdge = new javax.swing.JRadioButton();
sourceNodeComboBox = new javax.swing.JComboBox();
sourceNodeLabel = new java... | 654 | 1,093 | 1,747 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/nodes/ui/SetNodesSizeUI.java | FloatJTextFieldFilter | remove | class FloatJTextFieldFilter extends PlainDocument {
public static final String POSITIVE_FLOAT_ACCEPTED_CHARS = "0123456789.";
@Override
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
for (int i = 0; i < str.length(); i++) {
... |
String str = getText(0, getLength());
str = str.substring(0, offs) + str.substring(offs + len);
if (!str.equals("") && !str.equals(".")) {
super.remove(offs, len);
}
| 235 | 71 | 306 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/rows/merge/InterQuartileRangeNumber.java | InterQuartileRangeNumber | execute | class InterQuartileRangeNumber implements AttributeRowsMergeStrategy {
private Element[] rows;
private Column column;
private BigDecimal result;
@Override
public void setup(Element[] rows, Element selectedRow, Column column) {
this.rows = rows;
this.column = column;
}
@Ove... |
BigDecimal Q1, Q3;
Number[] numbers =
Lookup.getDefault().lookup(AttributeColumnsController.class).getRowsColumnNumbers(rows, column);
Q3 = StatisticsUtils.quartile3(numbers);
Q1 = StatisticsUtils.quartile1(numbers);
if (Q3 != null && Q1 != null) {
result... | 342 | 126 | 468 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/rows/merge/JoinWithSeparator.java | JoinWithSeparator | execute | class JoinWithSeparator implements AttributeRowsMergeStrategy {
public static final String SEPARATOR_SAVED_PREFERENCES = "JoinWithSeparator_Separator";
private static final String DEFAULT_SEPARATOR = ", ";
private Element[] rows;
private Column column;
private String separator, result;
public ... |
NbPreferences.forModule(JoinWithSeparator.class).put(SEPARATOR_SAVED_PREFERENCES, separator);
Object value;
StringBuilder sb;
final int rowsCount = rows.length;
TimeFormat timeFormat = column.getTable().getGraph().getModel().getTimeFormat();
DateTimeZone timeZone = col... | 515 | 216 | 731 | <no_super_class> |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/rows/merge/ui/JoinWithSeparatorUI.java | JoinWithSeparatorUI | initComponents | class JoinWithSeparatorUI extends javax.swing.JPanel implements ManipulatorUI {
JoinWithSeparator manipulator;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel separatorLabel;
private javax.swing.JTextField separatorText;
// End of variables declaration//GEN-E... |
separatorLabel = new javax.swing.JLabel();
separatorText = new javax.swing.JTextField();
separatorLabel.setText(org.openide.util.NbBundle
.getMessage(JoinWithSeparatorUI.class, "JoinWithSeparatorUI.separatorLabel.text")); // NOI18N
separatorText.setText(null);
ja... | 416 | 496 | 912 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/ui/GeneralChooseColumnsAndRowUI.java | GeneralChooseColumnsAndRowUI | refreshRows | class GeneralChooseColumnsAndRowUI extends javax.swing.JPanel implements ManipulatorUI {
private GeneralColumnsAndRowChooser columnsAndRowChooser;
private ColumnCheckBox[] columnsCheckBoxes;
private Element[] rows;//Node or edge
// Variables declaration - do not modify//GEN-BEGIN:variables
private ... |
rows = columnsAndRowChooser.getRows();
Object sourceRow = columnsAndRowChooser.getRow();
Node node;
Edge edge;
//Prepare combo box with nodes/edges data:
for (int i = 0; i < rows.length; i++) {
if (rows[i] instanceof Node) {
node = (Node) rows... | 1,680 | 199 | 1,879 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/ui/GeneralChooseColumnsUI.java | GeneralChooseColumnsUI | initComponents | class GeneralChooseColumnsUI extends javax.swing.JPanel implements ManipulatorUI {
private GeneralColumnsChooser columnsChooser;
private ColumnCheckBox[] columnsCheckBoxes;
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel contentPanel;
private javax.swing.JSc... |
contentScrollPane = new javax.swing.JScrollPane();
contentPanel = new javax.swing.JPanel();
descriptionLabel = new javax.swing.JLabel();
contentPanel.setLayout(new java.awt.GridLayout(1, 0));
contentScrollPane.setViewportView(contentPanel);
descriptionLabel.setText(nu... | 851 | 493 | 1,344 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DataLaboratoryPlugin/src/main/java/org/gephi/datalab/plugin/manipulators/values/NumberListStatisticsReport.java | NumberListStatisticsReport | setup | class NumberListStatisticsReport implements AttributeValueManipulator {
private Number[] numbers;
private Column column;
@Override
public void setup(Element row, Column column) {<FILL_FUNCTION_BODY>}
@Override
public void execute() {
}
@Override
public String getName() {
... |
this.column = column;
if (AttributeUtils.isNumberType(column.getTypeClass())) {
numbers =
Lookup.getDefault().lookup(AttributeColumnsController.class).getRowNumbers(row, new Column[] {column});
}
| 344 | 66 | 410 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopAppearance/src/main/java/org/gephi/desktop/appearance/AppearanceToolbar.java | CategoryToolbar | refreshTransformers | class CategoryToolbar extends AbstractToolbar {
private final List<ButtonGroup> buttonGroups = new ArrayList<>();
private final javax.swing.JLabel box;
private final javax.swing.ButtonGroup elementGroup;
public CategoryToolbar() {
super();
//Init components
... |
if (model != null) {
//Select the right transformer
int index = 0;
for (String elmtType : AppearanceUIController.ELEMENT_CLASSES) {
ButtonGroup g = buttonGroups.get(index);
boolean active = model.getSelectedElementClass... | 907 | 210 | 1,117 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopAppearance/src/main/java/org/gephi/desktop/appearance/AppearanceUIModelPersistenceProvider.java | AppearanceUIModelPersistenceProvider | readSavedProperty | class AppearanceUIModelPersistenceProvider implements WorkspaceXMLPersistenceProvider {
@Override
public void writeXML(XMLStreamWriter writer, Workspace workspace) {
AppearanceUIModel model = workspace.getLookup().lookup(AppearanceUIModel.class);
if (model != null) {
try {
... |
String key = reader.getAttributeValue(null, "key");
String value = reader.getAttributeValue(null, "value");
String type = reader.getAttributeValue(null, "type");
Object val = Serialization.readValueFromText(value, type);
if (val != null) {
map.put(key, val);
... | 1,509 | 91 | 1,600 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopAppearance/src/main/java/org/gephi/desktop/appearance/AutoAppyTransformer.java | AutoAppyTransformer | stop | class AutoAppyTransformer implements Runnable {
private static final long DEFAULT_DELAY = 500; //ms
private final Function function;
private final AppearanceUIController controller;
private ScheduledExecutorService executor;
public AutoAppyTransformer(Function function) {
this.controller ... |
if (executor != null && !executor.isShutdown()) {
executor.shutdown();
}
executor = null;
| 267 | 40 | 307 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopAppearance/src/main/java/org/gephi/desktop/appearance/FunctionObserverExecutor.java | FunctionObserverExecutor | start | class FunctionObserverExecutor implements Runnable {
private static final long DEFAULT_DELAY = 1250; //ms
private final AppearanceUIModel model;
private ScheduledExecutorService executor;
public FunctionObserverExecutor(AppearanceUIModel model) {
this.model = model;
}
public void sta... |
executor = Executors.newSingleThreadScheduledExecutor(r -> new Thread(r, "Appearance Function Observer"));
executor.scheduleWithFixedDelay(this, getDelayInMs(), getDelayInMs(), TimeUnit.MILLISECONDS);
| 317 | 66 | 383 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopAppearance/src/main/java/org/gephi/desktop/appearance/TableObserverExecutor.java | TableObserverExecutor | start | class TableObserverExecutor implements Runnable {
private static final long DEFAULT_DELAY = 1000; //ms
private final AppearanceUIModel model;
private ScheduledExecutorService executor;
private TableObserver nodeTableObserver;
private TableObserver edgeTableObserver;
public TableObserverExecut... |
GraphModel graphModel = model.appearanceModel.getGraphModel();
nodeTableObserver = graphModel.getNodeTable().createTableObserver(false);
edgeTableObserver = graphModel.getEdgeTable().createTableObserver(false);
executor = Executors.newSingleThreadScheduledExecutor(r -> new Thread(r, "A... | 524 | 120 | 644 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/CommandLineProcessor.java | CommandLineProcessor | process | class CommandLineProcessor extends OptionProcessor {
private final Option openOption = Option.defaultArguments();
private final Option openOption2 = Option.additionalArguments('o', "open");
private final String MEMORY_ERROR;
public CommandLineProcessor() {
MEMORY_ERROR = NbBundle.getMessage(Co... |
WindowManager.getDefault().invokeWhenUIReady(() -> new Thread(() -> {
List<String> filenameList = new ArrayList<>();
Object obj = values.get(openOption);
if (obj != null) {
filenameList.addAll(Arrays.asList((String[]) obj));
}
obj = va... | 187 | 522 | 709 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/DragNDropFrameAdapter.java | DragNDropFrameAdapter | register | class DragNDropFrameAdapter {
private static final String GEPHI_EXTENSION = "gephi";
public static void register() {<FILL_FUNCTION_BODY>}
} |
JFrame frame = (JFrame) WindowManager.getDefault().getMainWindow();
frame.setTransferHandler(new TransferHandler() {
@Override
public boolean canImport(TransferHandler.TransferSupport support) {
return support.isDataFlavorSupported(DataFlavor.javaFileListFlavor)... | 51 | 468 | 519 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/GephiKeyStoreProvider.java | GephiKeyStoreProvider | getKeyStore | class GephiKeyStoreProvider implements KeyStoreProvider {
private static final String KS_RESOURCE_PATH = "/keystore/truststore.ks";
private static final String KS_DEFAULT_PASSWORD = "open4all";
@Override
public KeyStore getKeyStore() {<FILL_FUNCTION_BODY>}
} |
try (InputStream inputStream = getClass().getResourceAsStream(KS_RESOURCE_PATH)) {
KeyStore keyStore;
keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(inputStream, KS_DEFAULT_PASSWORD.toCharArray());
return keyStore;
} catch (Exce... | 88 | 108 | 196 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/GephiURLDisplayer.java | GephiURLDisplayer | showURLExternal | class GephiURLDisplayer extends URLDisplayer {
@Override
public void showURL(URL u) {
showURLExternal(u);
}
@Override
public void showURLExternal(URL u) {<FILL_FUNCTION_BODY>}
} |
if (Desktop.isDesktopSupported()) {
Desktop d = Desktop.getDesktop();
if (d.isSupported(Desktop.Action.BROWSE)) {
try {
d.browse(u.toURI());
} catch (Throwable x) {
Exceptions.printStackTrace(x);
}
... | 71 | 123 | 194 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/Installer.java | Installer | checkForNewMajorRelease | class Installer extends ModuleInstall {
private static final String LATEST_GEPHI_VERSION_URL =
"https://raw.githubusercontent.com/gephi/gephi/gh-pages/latest";
protected static boolean isNewVersion(String latest, String current) {
String gephiVersionTst = current.replaceAll("[0-9]{12}", "").re... |
boolean doCheck =
NbPreferences.forModule(Installer.class).getBoolean("check_latest_version", true);
if (doCheck) {
InputStream stream = null;
BufferedReader reader = null;
try {
String gephiVersion = System.getProperty("netbeans.productve... | 1,256 | 542 | 1,798 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/ProjectOpenFilesHandler.java | ProjectOpenFilesHandler | openFiles | class ProjectOpenFilesHandler implements OpenFilesHandler {
private static final String GEPHI_EXTENSION = "gephi";
@Override
public void openFiles(OpenFilesEvent openFilesEvent) {<FILL_FUNCTION_BODY>}
} |
WindowManager.getDefault().invokeWhenUIReady(() -> new Thread(() -> {
Logger.getLogger(ProjectOpenFilesHandler.class.getName())
.info("Handling " + openFilesEvent.getFiles().size() + " from opening");
FileObject[] fileObjects = openFilesEvent.getFiles().stream().filter(... | 64 | 293 | 357 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/multilingual/LanguageAction.java | LanguageAction | actionPerformed | class LanguageAction extends CallableSystemAction {
private static final String APPNAME = "gephi";
@Override
public void performAction() {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public String getName() {
return NbBundle.getMessage(LanguageAc... |
String msg = NbBundle.getMessage(LanguageAction.class, "ChangeLang.Confirm.message");
String title = NbBundle.getMessage(LanguageAction.class, "ChangeLang.Confirm.title");
DialogDescriptor.Confirmation dd =
new DialogDescriptor.Confirm... | 1,172 | 216 | 1,388 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/reporter/ReporterHandler.java | ReporterHandler | publish | class ReporterHandler extends java.util.logging.Handler implements Callable<JButton>, ActionListener {
private Throwable throwable;
private final String MEMORY_ERROR;
public ReporterHandler() {
MEMORY_ERROR = NbBundle.getMessage(ReporterHandler.class, "OutOfMemoryError.message");
}
protec... |
if (record.getThrown() == null) {
return;
}
throwable = record.getThrown();
if (throwable != null && throwable instanceof OutOfMemoryError) {
Handler[] handlers = Logger.getLogger("").getHandlers();
for (int i = 0; i < handlers.length; i++) {
... | 507 | 173 | 680 | <methods>public abstract void close() throws java.lang.SecurityException,public abstract void flush() ,public java.lang.String getEncoding() ,public java.util.logging.ErrorManager getErrorManager() ,public java.util.logging.Filter getFilter() ,public java.util.logging.Formatter getFormatter() ,public java.util.logging.... |
gephi_gephi | gephi/modules/DesktopBranding/src/main/java/org/gephi/branding/desktop/reporter/ViewDataPanel.java | ViewDataPanel | initComponents | class ViewDataPanel extends javax.swing.JPanel {
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea textArea;
// End of variables declaration//GEN-END:variables
/**
* Creates new form ViewDataPanel
*/
... |
jScrollPane1 = new javax.swing.JScrollPane();
textArea = new javax.swing.JTextArea();
textArea.setColumns(20);
textArea.setRows(5);
jScrollPane1.setViewportView(textArea);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layou... | 378 | 299 | 677 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DesktopContext/src/main/java/org/gephi/desktop/context/ContextRefreshThread.java | ContextRefreshThread | run | class ContextRefreshThread extends TimerTask {
private static final long PERIOD = 500;
private final Timer timer;
private final GraphModel graphModel;
private final Runnable listener;
private int previousVersion = -1;
public ContextRefreshThread(GraphModel graphModel, Runnable listener) {
... |
Graph graph = graphModel.getGraphVisible();
int graphVersion = graph.getVersion();
if (graphVersion != previousVersion) {
listener.run();
}
previousVersion = graphVersion;
| 187 | 55 | 242 | <methods>public boolean cancel() ,public abstract void run() ,public long scheduledExecutionTime() <variables>static final int CANCELLED,static final int EXECUTED,static final int SCHEDULED,static final int VIRGIN,final java.lang.Object lock,long nextExecutionTime,long period,int state |
gephi_gephi | gephi/modules/DesktopContext/src/main/java/org/gephi/desktop/context/ContextTopComponent.java | ContextTopComponent | writeProperties | class ContextTopComponent extends TopComponent {
private final transient ContextPanel contextPanel = new ContextPanel();
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JPanel mainPanel;
// End of variables declaration//GEN-END:variables
public ContextTopComponent... |
// better to version settings since initial version as advocated at
// http://wiki.apidesign.org/wiki/PropertyFiles
p.setProperty("version", "1.0");
// TODO store your settings
| 689 | 55 | 744 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/AvailableColumnsModel.java | AvailableColumnsModel | syncronizeTableColumns | class AvailableColumnsModel {
private static final int MAX_AVAILABLE_COLUMNS = 20;
private final Set<Column> availableColumns = new HashSet<>();
private final Set<Column> allKnownColumns = new HashSet<>();
private final Table table;
public AvailableColumnsModel(Table table) {
this.table = ... |
Set<Column> availableColumnsCopy = new HashSet<>(availableColumns);
removeAllColumns();
//Detect new columns and make them available by default:
//Also keep existing available columns as available.
//Note: We need to remove all columns and add them all again because there cou... | 585 | 172 | 757 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/AvailableColumnsPanel.java | AvailableColumnsPanel | initComponents | class AvailableColumnsPanel extends javax.swing.JPanel {
private final Table table;
private final AvailableColumnsModel availableColumnsModel;
private final Column[] columns;
private JCheckBox[] columnsCheckBoxes;
private AvailableColumnsValidator validator;
// Variables declaration - do not mo... |
scroll = new javax.swing.JScrollPane();
contentPanel = new javax.swing.JPanel();
descriptionLabel = new javax.swing.JLabel();
contentPanel.setLayout(new java.awt.GridLayout());
scroll.setViewportView(contentPanel);
descriptionLabel.setText(org.openide.util.NbBundle
... | 951 | 532 | 1,483 | <methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void s... |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/DataTablesModel.java | DataTablesModel | getTableAvailableColumnsModel | class DataTablesModel {
private final AvailableColumnsModel nodeAvailableColumnsModel;
private final AvailableColumnsModel edgeAvailableColumnsModel;
private final GraphModel graphModel;
public DataTablesModel(Workspace workspace) {
graphModel = Lookup.getDefault().lookup(GraphController.class... |
if (graphModel.getNodeTable() == table) {
return nodeAvailableColumnsModel;
} else if (graphModel.getEdgeTable() == table) {
return edgeAvailableColumnsModel;
} else {
return null;//Graph table or other table, not supported in data laboratory for now.
... | 247 | 79 | 326 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/DataTablesObservers.java | DataTablesObservers | processTableObseverChanges | class DataTablesObservers {
private final Workspace workspace;
private final GraphModel graphModel;
private final Set<ColumnObserver> columnObservers;
private GraphObserver graphObserver;
private TableObserver nodesTableObserver;
private TableObserver edgesTableObserver;
public Da... |
boolean hasChanges = false;
if (observer.hasTableChanged()) {
hasChanges = true;
TableDiff diff = observer.getDiff();
for (Column addedColumn : diff.getAddedColumns()) {
createColumnObserver(addedColumn);
}
for (Column ... | 962 | 181 | 1,143 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/DefaultDataTablesEventListenerBuilder.java | DefaultDataTablesEventListenerBuilder | getDataTablesEventListener | class DefaultDataTablesEventListenerBuilder implements DataTablesEventListenerBuilder {
@Override
public DataTablesEventListener getDataTablesEventListener() {<FILL_FUNCTION_BODY>}
} |
if (SwingUtilities.isEventDispatchThread()) {
return (DataTableTopComponent) WindowManager.getDefault().findTopComponent("DataTableTopComponent");
} else {
final List<DataTableTopComponent> listenerHolder = new ArrayList<>();
try {
//We have to do thi... | 48 | 244 | 292 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/actions/ImportSpreadsheet.java | ImportSpreadsheet | actionPerformed | class ImportSpreadsheet implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {<FILL_FUNCTION_BODY>}
} |
DataLaboratoryHelper dlh = Lookup.getDefault().lookup(DataLaboratoryHelper.class);
GeneralActionsManipulator m = dlh.getGeneralActionsManipulatorByName("ImportCSV");
if (m != null) {
dlh.executeManipulator(m);
} else {
throw new UnsupportedOperationExcept... | 46 | 107 | 153 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/persistence/DataLaboratoryPersistenceProvider.java | DataLaboratoryPersistenceProvider | readDataTablesModel | class DataLaboratoryPersistenceProvider implements WorkspaceXMLPersistenceProvider {
private static final String AVAILABLE_COLUMNS = "availablecolumns";
private static final String NODE_COLUMN = "nodecolumn";
private static final String EDGE_COLUMN = "edgecolumn";
@Override
public void writeXML(XM... |
GraphModel graphModel = workspace.getLookup().lookup(GraphModel.class);
Table nodesTable = graphModel.getNodeTable();
Table edgesTable = graphModel.getEdgeTable();
DataTablesModel dataTablesModel = workspace.getLookup().lookup(DataTablesModel.class);
if (dataTablesModel == null)... | 508 | 450 | 958 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/tables/EdgesDataTable.java | EdgesDataTable | keyReleased | class EdgesDataTable extends AbstractElementsDataTable<Edge> {
private final PropertyDataColumn<Edge> TYPE_COLUMN =
new PropertyDataColumn<Edge>(NbBundle.getMessage(EdgesDataTable.class, "EdgeDataTable.type.column.text")) {
@Override
public Class getColumnClass() {
... |
if (e.getKeyCode() == KeyEvent.VK_DELETE) {
DataLaboratoryHelper dlh = DataLaboratoryHelper.getDefault();
List<Edge> selectedEdges = getElementsFromSelectedRows();
if (!selectedEdges.isEmpty()) {
EdgesManipulator d... | 1,407 | 177 | 1,584 | <methods>public void <init>() ,public Column getColumnAtIndex(int) ,public Edge getElementFromRow(int) ,public List<Edge> getElementsFromSelectedRows() ,public abstract List<? extends ElementDataColumn<Edge>> getFakeDataColumns(GraphModel, org.gephi.desktop.datalab.DataTablesModel) ,public GraphModel getGraphModel() ,p... |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/tables/ElementsDataTableModel.java | ElementsDataTableModel | configure | class ElementsDataTableModel<T extends Element> extends AbstractTableModel {
private T[] elements;
private ElementDataColumn<T>[] columns;
public ElementsDataTableModel(T[] elements, ElementDataColumn<T>[] cols) {
this.elements = elements;
this.columns = cols;
}
@Override
... |
Set<ElementDataColumn> oldColumns = new HashSet<ElementDataColumn>(Arrays.asList(this.columns));
Set<ElementDataColumn> newColumns = new HashSet<ElementDataColumn>(Arrays.asList(columns));
boolean columnsChanged = !oldColumns.equals(newColumns);
this.columns = columns;
th... | 681 | 162 | 843 | <methods>public void addTableModelListener(javax.swing.event.TableModelListener) ,public int findColumn(java.lang.String) ,public void fireTableCellUpdated(int, int) ,public void fireTableChanged(javax.swing.event.TableModelEvent) ,public void fireTableDataChanged() ,public void fireTableRowsDeleted(int, int) ,public v... |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/tables/NodesDataTable.java | NodesDataTable | valueChanged | class NodesDataTable extends AbstractElementsDataTable<Node> {
private final List<PropertyDataColumn<Node>> propertiesColumns = new ArrayList<>();
public NodesDataTable() {
super();
//Add listener of table selection to refresh edit window when the selection changes (and if the table ... |
if (!isRefreshingTable()) {
EditWindowController edc = Lookup.getDefault().lookup(EditWindowController.class);
if (edc != null && edc.isOpen()) {
if (table.getSelectedRow() != -1) {
edc.editNodes(getElement... | 439 | 126 | 565 | <methods>public void <init>() ,public Column getColumnAtIndex(int) ,public Node getElementFromRow(int) ,public List<Node> getElementsFromSelectedRows() ,public abstract List<? extends ElementDataColumn<Node>> getFakeDataColumns(GraphModel, org.gephi.desktop.datalab.DataTablesModel) ,public GraphModel getGraphModel() ,p... |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/tables/celleditors/AttributeTypesSupportCellEditor.java | AttributeTypesSupportCellEditor | getTableCellEditorComponent | class AttributeTypesSupportCellEditor extends DefaultCellEditor {
private static final Border RED_BORDER = new LineBorder(Color.red);
private final GraphModelProvider graphModelProvider;
private final JTextField textField;
private final Border originalBorder;
private final Class<?> typeCl... |
TimeFormat timeFormat = graphModelProvider.getGraphModel().getTimeFormat();
DateTimeZone timeZone = graphModelProvider.getGraphModel().getTimeZone();
String valueStr;
if (value == null) {
valueStr = "";
} else if (isTimestampSetType) {
valueStr... | 613 | 305 | 918 | <methods>public void <init>(javax.swing.JTextField) ,public void <init>(javax.swing.JCheckBox) ,public void <init>(JComboBox<?>) ,public void cancelCellEditing() ,public java.lang.Object getCellEditorValue() ,public int getClickCountToStart() ,public java.awt.Component getComponent() ,public java.awt.Component getTable... |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/tables/columns/AttributeDataColumn.java | AttributeDataColumn | equals | class AttributeDataColumn<T extends Element> implements ElementDataColumn<T> {
private final AttributeColumnsController attributeColumnsController;
private final Column column;
private final Class<?> columnClassForTable;
public AttributeDataColumn(AttributeColumnsController attributeColumnsContr... |
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final AttributeDataColumn other = (AttributeDataColumn) obj;
return this.column == other.column || (this.column != null && this.column.equals(other.colu... | 422 | 97 | 519 | <no_super_class> |
gephi_gephi | gephi/modules/DesktopDataLaboratory/src/main/java/org/gephi/desktop/datalab/tables/popup/AbstractPopupAdapter.java | AbstractPopupAdapter | showPopup | class AbstractPopupAdapter<T extends Element> extends MouseUtils.PopupMouseAdapter {
protected final AbstractElementsDataTable<T> elementsDataTable;
protected final JXTable table;
public AbstractPopupAdapter(AbstractElementsDataTable<T> elementsDataTable) {
super();
this.elementsDat... |
int selRow = table.rowAtPoint(e.getPoint());
if (selRow != -1) {
if (!table.getSelectionModel().isSelectedIndex(selRow)) {
table.getSelectionModel().clearSelection();
table.getSelectionModel().setSelectionInterval(selRow, selRow);
}
... | 390 | 247 | 637 | <no_super_class> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.