bugged
stringlengths 6
599k
| fixed
stringlengths 6
40.8M
| __index_level_0__
int64 0
3.24M
|
---|---|---|
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; // Find all vertices that are start nodes (START_NODE) if ( v.getUserDatum( LABEL_KEY ).equals( START_NODE ) ) { Object[] edges = v.getOutEdges().toArray(); if ( edges.length != 1 ) { throw new RuntimeException( "A start nod can only have one out edge, look in file: " + g.getUserDatum( FILE_KEY ) ); } DirectedSparseEdge edge = (DirectedSparseEdge)edges[ 0 ]; g.addUserDatum( LABEL_KEY, edge.getDest().getUserDatum(LABEL_KEY), UserData.SHARED ); if ( edge.containsUserDatumKey( LABEL_KEY ) ) { if ( foundStartGraph == true ) { throw new RuntimeException( "A start nod can only exist in one file, see files " + _graph.getUserDatum( FILE_KEY )+ ", and " + g.getUserDatum( FILE_KEY ) ); } foundStartGraph = true; _graph = g; } else { // Since the edge does not contain a label, this is a subgraph // Mark the destination node of the edge to a subgraph starting node edge.getDest().addUserDatum( SUBGRAPH_START_VERTEX, SUBGRAPH_START_VERTEX, UserData.SHARED ); } } } } _logger.debug( "Investigating graph: " + _graph.getUserDatum( LABEL_KEY ) ); for ( int i = 0; i < _graphList.size(); i++ ) { SparseGraph g = (SparseGraph)_graphList.elementAt( i ); _logger.debug( "With graph: " + g.getUserDatum( LABEL_KEY ) + " in file: " + g.getUserDatum( FILE_KEY ) ); if ( _graph.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { _logger.debug( " Graphs are the same, next..." ); continue; } Object[] vertices = _graph.getVertices().toArray(); for ( int j = 0; j < vertices.length; j++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)vertices[ j ]; _logger.debug( "Investigating vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) ); if ( v1.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { if ( v1.containsUserDatumKey( MERGE ) ) { _logger.debug( "The vertex is marked MERGE, and will not be replaced by a subgraph."); continue; } if ( v1.containsUserDatumKey( NO_MERGE ) ) { _logger.debug( "The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); continue; } _logger.debug( "A subgraph'ed vertex: " + v1.getUserDatum( LABEL_KEY ) + " in graph: " + g.getUserDatum( FILE_KEY ) + ", equals a node in the graph in file: " + _graph.getUserDatum( FILE_KEY ) ); appendGraph( _graph, g ); //writeGraph("/tmp/debug_append.graphml"); copySubGraphs( _graph, v1 ); //writeGraph("/tmp/debug_merge.graphml"); vertices = _graph.getVertices().toArray(); i = -1; j = -1; } } } // Merge all nodes marked MERGE Object[] list1 = _graph.getVertices().toArray(); for ( int i = 0; i < list1.length; i++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)list1[ i ]; if ( v1.containsUserDatumKey( MERGE ) == false ) { continue; } Object[] list2 = _graph.getVertices().toArray(); for ( int j = 0; j < list2.length; j++ ) { DirectedSparseVertex v2 = (DirectedSparseVertex)list2[ j ]; if ( v1.hashCode() == v2.hashCode() ) { continue; } if ( v1.getUserDatum( LABEL_KEY ).equals( v2.getUserDatum( LABEL_KEY ) ) == false ) { continue; } _logger.debug( "Merging vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) + "with vertex(" + v2.hashCode() ); Object[] inEdges = v1.getInEdges().toArray(); for (int x = 0; x < inEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( edge.getSource(), v2 ) ); new_edge.importUserData( edge ); } Object[] outEdges = v1.getOutEdges().toArray(); for (int x = 0; x < outEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( v2, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing merged vertex(" + v1.hashCode() + ")" ); } _graph.removeVertex( v1 ); } _logger.debug( "Done merging" ); }
|
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; // Find all vertices that are start nodes (START_NODE) if ( v.getUserDatum( LABEL_KEY ).equals( START_NODE ) ) { Object[] edges = v.getOutEdges().toArray(); if ( edges.length != 1 ) { throw new RuntimeException( "A start nod can only have one out edge, look in file: " + g.getUserDatum( FILE_KEY ) ); } DirectedSparseEdge edge = (DirectedSparseEdge)edges[ 0 ]; g.addUserDatum( LABEL_KEY, edge.getDest().getUserDatum(LABEL_KEY), UserData.SHARED ); if ( edge.containsUserDatumKey( LABEL_KEY ) ) { if ( foundStartGraph == true ) { throw new RuntimeException( "A start nod can only exist in one file, see files " + _graph.getUserDatum( FILE_KEY )+ ", and " + g.getUserDatum( FILE_KEY ) ); } foundStartGraph = true; _graph = g; } else { // Since the edge does not contain a label, this is a subgraph // Mark the destination node of the edge to a subgraph starting node edge.getDest().addUserDatum( SUBGRAPH_START_VERTEX, SUBGRAPH_START_VERTEX, UserData.SHARED ); } } } } _logger.debug( "Investigating graph: " + _graph.getUserDatum( LABEL_KEY ) ); for ( int i = 0; i < _graphList.size(); i++ ) { SparseGraph g = (SparseGraph)_graphList.elementAt( i ); _logger.debug( "With graph: " + g.getUserDatum( LABEL_KEY ) + " in file: " + g.getUserDatum( FILE_KEY ) ); if ( _graph.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { _logger.debug( " Graphs are the same, next..." ); continue; } Object[] vertices = _graph.getVertices().toArray(); for ( int j = 0; j < vertices.length; j++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)vertices[ j ]; _logger.debug( "Investigating vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) ); if ( v1.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { if ( v1.containsUserDatumKey( MERGE ) ) { _logger.debug( "The vertex is marked MERGE, and will not be replaced by a subgraph."); continue; } if ( v1.containsUserDatumKey( NO_MERGE ) ) { _logger.debug( "The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); continue; } _logger.debug( "A subgraph'ed vertex: " + v1.getUserDatum( LABEL_KEY ) + " in graph: " + g.getUserDatum( FILE_KEY ) + ", equals a node in the graph in file: " + _graph.getUserDatum( FILE_KEY ) ); appendGraph( _graph, g ); //writeGraph("/tmp/debug_append.graphml"); copySubGraphs( _graph, v1 ); //writeGraph("/tmp/debug_merge.graphml"); vertices = _graph.getVertices().toArray(); i = -1; j = -1; } } } // Merge all nodes marked MERGE Object[] list1 = _graph.getVertices().toArray(); for ( int i = 0; i < list1.length; i++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)list1[ i ]; if ( v1.containsUserDatumKey( MERGE ) == false ) { continue; } Object[] list2 = _graph.getVertices().toArray(); for ( int j = 0; j < list2.length; j++ ) { DirectedSparseVertex v2 = (DirectedSparseVertex)list2[ j ]; if ( v1.hashCode() == v2.hashCode() ) { continue; } if ( v1.getUserDatum( LABEL_KEY ).equals( v2.getUserDatum( LABEL_KEY ) ) == false ) { continue; } _logger.debug( "Merging vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) + "with vertex(" + v2.hashCode() ); Object[] inEdges = v1.getInEdges().toArray(); for (int x = 0; x < inEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( edge.getSource(), v2 ) ); new_edge.importUserData( edge ); } Object[] outEdges = v1.getOutEdges().toArray(); for (int x = 0; x < outEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( v2, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing merged vertex(" + v1.hashCode() + ")" ); } _graph.removeVertex( v1 ); } _logger.debug( "Done merging" ); }
| 3,239,960 |
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; // Find all vertices that are start nodes (START_NODE) if ( v.getUserDatum( LABEL_KEY ).equals( START_NODE ) ) { Object[] edges = v.getOutEdges().toArray(); if ( edges.length != 1 ) { throw new RuntimeException( "A start nod can only have one out edge, look in file: " + g.getUserDatum( FILE_KEY ) ); } DirectedSparseEdge edge = (DirectedSparseEdge)edges[ 0 ]; g.addUserDatum( LABEL_KEY, edge.getDest().getUserDatum(LABEL_KEY), UserData.SHARED ); if ( edge.containsUserDatumKey( LABEL_KEY ) ) { if ( foundStartGraph == true ) { throw new RuntimeException( "A start nod can only exist in one file, see files " + _graph.getUserDatum( FILE_KEY )+ ", and " + g.getUserDatum( FILE_KEY ) ); } foundStartGraph = true; _graph = g; } else { // Since the edge does not contain a label, this is a subgraph // Mark the destination node of the edge to a subgraph starting node edge.getDest().addUserDatum( SUBGRAPH_START_VERTEX, SUBGRAPH_START_VERTEX, UserData.SHARED ); } } } } _logger.debug( "Investigating graph: " + _graph.getUserDatum( LABEL_KEY ) ); for ( int i = 0; i < _graphList.size(); i++ ) { SparseGraph g = (SparseGraph)_graphList.elementAt( i ); _logger.debug( "With graph: " + g.getUserDatum( LABEL_KEY ) + " in file: " + g.getUserDatum( FILE_KEY ) ); if ( _graph.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { _logger.debug( " Graphs are the same, next..." ); continue; } Object[] vertices = _graph.getVertices().toArray(); for ( int j = 0; j < vertices.length; j++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)vertices[ j ]; _logger.debug( "Investigating vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) ); if ( v1.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { if ( v1.containsUserDatumKey( MERGE ) ) { _logger.debug( "The vertex is marked MERGE, and will not be replaced by a subgraph."); continue; } if ( v1.containsUserDatumKey( NO_MERGE ) ) { _logger.debug( "The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); continue; } _logger.debug( "A subgraph'ed vertex: " + v1.getUserDatum( LABEL_KEY ) + " in graph: " + g.getUserDatum( FILE_KEY ) + ", equals a node in the graph in file: " + _graph.getUserDatum( FILE_KEY ) ); appendGraph( _graph, g ); //writeGraph("/tmp/debug_append.graphml"); copySubGraphs( _graph, v1 ); //writeGraph("/tmp/debug_merge.graphml"); vertices = _graph.getVertices().toArray(); i = -1; j = -1; } } } // Merge all nodes marked MERGE Object[] list1 = _graph.getVertices().toArray(); for ( int i = 0; i < list1.length; i++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)list1[ i ]; if ( v1.containsUserDatumKey( MERGE ) == false ) { continue; } Object[] list2 = _graph.getVertices().toArray(); for ( int j = 0; j < list2.length; j++ ) { DirectedSparseVertex v2 = (DirectedSparseVertex)list2[ j ]; if ( v1.hashCode() == v2.hashCode() ) { continue; } if ( v1.getUserDatum( LABEL_KEY ).equals( v2.getUserDatum( LABEL_KEY ) ) == false ) { continue; } _logger.debug( "Merging vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) + "with vertex(" + v2.hashCode() ); Object[] inEdges = v1.getInEdges().toArray(); for (int x = 0; x < inEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( edge.getSource(), v2 ) ); new_edge.importUserData( edge ); } Object[] outEdges = v1.getOutEdges().toArray(); for (int x = 0; x < outEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( v2, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing merged vertex(" + v1.hashCode() + ")" ); } _graph.removeVertex( v1 ); } _logger.debug( "Done merging" ); }
|
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; // Find all vertices that are start nodes (START_NODE) if ( v.getUserDatum( LABEL_KEY ).equals( START_NODE ) ) { Object[] edges = v.getOutEdges().toArray(); if ( edges.length != 1 ) { throw new RuntimeException( "A start nod can only have one out edge, look in file: " + g.getUserDatum( FILE_KEY ) ); } DirectedSparseEdge edge = (DirectedSparseEdge)edges[ 0 ]; g.addUserDatum( LABEL_KEY, edge.getDest().getUserDatum(LABEL_KEY), UserData.SHARED ); if ( edge.containsUserDatumKey( LABEL_KEY ) ) { if ( foundStartGraph == true ) { throw new RuntimeException( "A start nod can only exist in one file, see files " + _graph.getUserDatum( FILE_KEY )+ ", and " + g.getUserDatum( FILE_KEY ) ); } foundStartGraph = true; _graph = g; } else { // Since the edge does not contain a label, this is a subgraph // Mark the destination node of the edge to a subgraph starting node edge.getDest().addUserDatum( SUBGRAPH_START_VERTEX, SUBGRAPH_START_VERTEX, UserData.SHARED ); } } } } _logger.debug( "Investigating graph: " + _graph.getUserDatum( LABEL_KEY ) ); for ( int i = 0; i < _graphList.size(); i++ ) { SparseGraph g = (SparseGraph)_graphList.elementAt( i ); _logger.debug( "With graph: " + g.getUserDatum( LABEL_KEY ) + " in file: " + g.getUserDatum( FILE_KEY ) ); if ( _graph.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { _logger.debug( " Graphs are the same, next..." ); continue; } Object[] vertices = _graph.getVertices().toArray(); for ( int j = 0; j < vertices.length; j++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)vertices[ j ]; _logger.debug( "Investigating vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) ); if ( v1.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { if ( v1.containsUserDatumKey( MERGE ) ) { _logger.debug( "The vertex is marked MERGE, and will not be replaced by a subgraph."); continue; } if ( v1.containsUserDatumKey( NO_MERGE ) ) { _logger.debug( "The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); continue; } _logger.debug( "A subgraph'ed vertex: " + v1.getUserDatum( LABEL_KEY ) + " in graph: " + g.getUserDatum( FILE_KEY ) + ", equals a node in the graph in file: " + _graph.getUserDatum( FILE_KEY ) ); appendGraph( _graph, g ); //writeGraph("/tmp/debug_append.graphml"); copySubGraphs( _graph, v1 ); //writeGraph("/tmp/debug_merge.graphml"); vertices = _graph.getVertices().toArray(); i = -1; j = -1; } } } // Merge all nodes marked MERGE Object[] list1 = _graph.getVertices().toArray(); for ( int i = 0; i < list1.length; i++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)list1[ i ]; if ( v1.containsUserDatumKey( MERGE ) == false ) { continue; } Object[] list2 = _graph.getVertices().toArray(); for ( int j = 0; j < list2.length; j++ ) { DirectedSparseVertex v2 = (DirectedSparseVertex)list2[ j ]; if ( v1.hashCode() == v2.hashCode() ) { continue; } if ( v1.getUserDatum( LABEL_KEY ).equals( v2.getUserDatum( LABEL_KEY ) ) == false ) { continue; } _logger.debug( "Merging vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) + "with vertex(" + v2.hashCode() ); Object[] inEdges = v1.getInEdges().toArray(); for (int x = 0; x < inEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( edge.getSource(), v2 ) ); new_edge.importUserData( edge ); } Object[] outEdges = v1.getOutEdges().toArray(); for (int x = 0; x < outEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( v2, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing merged vertex(" + v1.hashCode() + ")" ); } _graph.removeVertex( v1 ); } _logger.debug( "Done merging" ); }
| 3,239,961 |
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; // Find all vertices that are start nodes (START_NODE) if ( v.getUserDatum( LABEL_KEY ).equals( START_NODE ) ) { Object[] edges = v.getOutEdges().toArray(); if ( edges.length != 1 ) { throw new RuntimeException( "A start nod can only have one out edge, look in file: " + g.getUserDatum( FILE_KEY ) ); } DirectedSparseEdge edge = (DirectedSparseEdge)edges[ 0 ]; g.addUserDatum( LABEL_KEY, edge.getDest().getUserDatum(LABEL_KEY), UserData.SHARED ); if ( edge.containsUserDatumKey( LABEL_KEY ) ) { if ( foundStartGraph == true ) { throw new RuntimeException( "A start nod can only exist in one file, see files " + _graph.getUserDatum( FILE_KEY )+ ", and " + g.getUserDatum( FILE_KEY ) ); } foundStartGraph = true; _graph = g; } else { // Since the edge does not contain a label, this is a subgraph // Mark the destination node of the edge to a subgraph starting node edge.getDest().addUserDatum( SUBGRAPH_START_VERTEX, SUBGRAPH_START_VERTEX, UserData.SHARED ); } } } } _logger.debug( "Investigating graph: " + _graph.getUserDatum( LABEL_KEY ) ); for ( int i = 0; i < _graphList.size(); i++ ) { SparseGraph g = (SparseGraph)_graphList.elementAt( i ); _logger.debug( "With graph: " + g.getUserDatum( LABEL_KEY ) + " in file: " + g.getUserDatum( FILE_KEY ) ); if ( _graph.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { _logger.debug( " Graphs are the same, next..." ); continue; } Object[] vertices = _graph.getVertices().toArray(); for ( int j = 0; j < vertices.length; j++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)vertices[ j ]; _logger.debug( "Investigating vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) ); if ( v1.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { if ( v1.containsUserDatumKey( MERGE ) ) { _logger.debug( "The vertex is marked MERGE, and will not be replaced by a subgraph."); continue; } if ( v1.containsUserDatumKey( NO_MERGE ) ) { _logger.debug( "The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); continue; } _logger.debug( "A subgraph'ed vertex: " + v1.getUserDatum( LABEL_KEY ) + " in graph: " + g.getUserDatum( FILE_KEY ) + ", equals a node in the graph in file: " + _graph.getUserDatum( FILE_KEY ) ); appendGraph( _graph, g ); //writeGraph("/tmp/debug_append.graphml"); copySubGraphs( _graph, v1 ); //writeGraph("/tmp/debug_merge.graphml"); vertices = _graph.getVertices().toArray(); i = -1; j = -1; } } } // Merge all nodes marked MERGE Object[] list1 = _graph.getVertices().toArray(); for ( int i = 0; i < list1.length; i++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)list1[ i ]; if ( v1.containsUserDatumKey( MERGE ) == false ) { continue; } Object[] list2 = _graph.getVertices().toArray(); for ( int j = 0; j < list2.length; j++ ) { DirectedSparseVertex v2 = (DirectedSparseVertex)list2[ j ]; if ( v1.hashCode() == v2.hashCode() ) { continue; } if ( v1.getUserDatum( LABEL_KEY ).equals( v2.getUserDatum( LABEL_KEY ) ) == false ) { continue; } _logger.debug( "Merging vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) + "with vertex(" + v2.hashCode() ); Object[] inEdges = v1.getInEdges().toArray(); for (int x = 0; x < inEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( edge.getSource(), v2 ) ); new_edge.importUserData( edge ); } Object[] outEdges = v1.getOutEdges().toArray(); for (int x = 0; x < outEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( v2, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing merged vertex(" + v1.hashCode() + ")" ); } _graph.removeVertex( v1 ); } _logger.debug( "Done merging" ); }
|
private void analyseSubGraphs() { boolean foundStartGraph = false; for ( Iterator iter = _graphList.iterator(); iter.hasNext(); ) { SparseGraph g = (SparseGraph) iter.next(); Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; // Find all vertices that are start nodes (START_NODE) if ( v.getUserDatum( LABEL_KEY ).equals( START_NODE ) ) { Object[] edges = v.getOutEdges().toArray(); if ( edges.length != 1 ) { throw new RuntimeException( "A start nod can only have one out edge, look in file: " + g.getUserDatum( FILE_KEY ) ); } DirectedSparseEdge edge = (DirectedSparseEdge)edges[ 0 ]; g.addUserDatum( LABEL_KEY, edge.getDest().getUserDatum(LABEL_KEY), UserData.SHARED ); if ( edge.containsUserDatumKey( LABEL_KEY ) ) { if ( foundStartGraph == true ) { throw new RuntimeException( "A start nod can only exist in one file, see files " + _graph.getUserDatum( FILE_KEY )+ ", and " + g.getUserDatum( FILE_KEY ) ); } foundStartGraph = true; _graph = g; } else { // Since the edge does not contain a label, this is a subgraph // Mark the destination node of the edge to a subgraph starting node edge.getDest().addUserDatum( SUBGRAPH_START_VERTEX, SUBGRAPH_START_VERTEX, UserData.SHARED ); } } } } _logger.debug( "Investigating graph: " + _graph.getUserDatum( LABEL_KEY ) ); for ( int i = 0; i < _graphList.size(); i++ ) { SparseGraph g = (SparseGraph)_graphList.elementAt( i ); _logger.debug( "With graph: " + g.getUserDatum( LABEL_KEY ) + " in file: " + g.getUserDatum( FILE_KEY ) ); if ( _graph.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { _logger.debug( " Graphs are the same, next..." ); continue; } Object[] vertices = _graph.getVertices().toArray(); for ( int j = 0; j < vertices.length; j++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)vertices[ j ]; _logger.debug( "Investigating vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) ); if ( v1.getUserDatum( LABEL_KEY ).equals( g.getUserDatum( LABEL_KEY ) ) ) { if ( v1.containsUserDatumKey( MERGE ) ) { _logger.debug( "The vertex is marked MERGE, and will not be replaced by a subgraph."); continue; } if ( v1.containsUserDatumKey( NO_MERGE ) ) { _logger.debug( "The vertex is marked NO_MERGE, and will not be replaced by a subgraph."); continue; } _logger.debug( "A subgraph'ed vertex: " + v1.getUserDatum( LABEL_KEY ) + " in graph: " + g.getUserDatum( FILE_KEY ) + ", equals a node in the graph in file: " + _graph.getUserDatum( FILE_KEY ) ); appendGraph( _graph, g ); //writeGraph("/tmp/debug_append.graphml"); copySubGraphs( _graph, v1 ); //writeGraph("/tmp/debug_merge.graphml"); vertices = _graph.getVertices().toArray(); i = -1; j = -1; } } } // Merge all nodes marked MERGE Object[] list1 = _graph.getVertices().toArray(); for ( int i = 0; i < list1.length; i++ ) { DirectedSparseVertex v1 = (DirectedSparseVertex)list1[ i ]; if ( v1.containsUserDatumKey( MERGE ) == false ) { continue; } Object[] list2 = _graph.getVertices().toArray(); for ( int j = 0; j < list2.length; j++ ) { DirectedSparseVertex v2 = (DirectedSparseVertex)list2[ j ]; if ( v1.hashCode() == v2.hashCode() ) { continue; } if ( v1.getUserDatum( LABEL_KEY ).equals( v2.getUserDatum( LABEL_KEY ) ) == false ) { continue; } _logger.debug( "Merging vertex(" + v1.hashCode() + "): " + v1.getUserDatum( LABEL_KEY ) + "with vertex(" + v2.hashCode() ); Object[] inEdges = v1.getInEdges().toArray(); for (int x = 0; x < inEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( edge.getSource(), v2 ) ); new_edge.importUserData( edge ); } Object[] outEdges = v1.getOutEdges().toArray(); for (int x = 0; x < outEdges.length; x++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ x ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)_graph.addEdge( new DirectedSparseEdge( v2, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing merged vertex(" + v1.hashCode() + ")" ); } _graph.removeVertex( v1 ); } _logger.debug( "Done merging" ); }
| 3,239,962 |
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
|
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
| 3,239,963 |
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
|
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
| 3,239,964 |
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
|
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
| 3,239,965 |
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
|
private void copySubGraphs( SparseGraph g, DirectedSparseVertex targetVertex ) { DirectedSparseVertex sourceVertex = null; Object[] vertices = g.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex v = (DirectedSparseVertex)vertices[ i ]; if ( v.getUserDatum( LABEL_KEY ).equals( targetVertex.getUserDatum( LABEL_KEY ) ) ) { if ( v.containsUserDatumKey( SUBGRAPH_START_VERTEX ) == false ) { continue; } if ( v.containsUserDatumKey( MERGE ) ) { continue; } if ( v.containsUserDatumKey( NO_MERGE ) ) { continue; } if ( v.hashCode() == targetVertex.hashCode() ) { continue; } sourceVertex = v; break; } } if ( sourceVertex == null ) { return; } _logger.info( "Start merging target vertex(" + targetVertex.hashCode() + ") with source vertex(" + sourceVertex.hashCode() + "), " + sourceVertex.getUserDatum( LABEL_KEY ) ); Object[] inEdges = sourceVertex.getInEdges().toArray(); for (int i = 0; i < inEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)inEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( edge.getSource(), targetVertex ) ); new_edge.importUserData( edge ); } Object[] outEdges = sourceVertex.getOutEdges().toArray(); for (int i = 0; i < outEdges.length; i++) { DirectedSparseEdge edge = (DirectedSparseEdge)outEdges[ i ]; DirectedSparseEdge new_edge = (DirectedSparseEdge)g.addEdge( new DirectedSparseEdge( targetVertex, edge.getDest() ) ); new_edge.importUserData( edge ); } _logger.debug( "Remvoing source vertex(" + sourceVertex.hashCode() + ")" ); g.removeVertex( sourceVertex ); targetVertex.addUserDatum( NO_MERGE, "no merge", UserData.SHARED ); }
| 3,239,966 |
private void executeMethod( boolean optimize ) throws FoundNoEdgeException { DirectedSparseEdge edge = null; Object[] outEdges = null; if ( _nextVertex.containsUserDatumKey( BACK_KEY ) && _history. size() >= 3 ) { Float probability = (Float)_nextVertex.getUserDatum( BACK_KEY ); int index = _radomGenerator.nextInt( 100 ); if ( index < ( probability.floatValue() * 100 ) ) { String str = (String)_history.removeLast(); _logger.debug( "Remove from history: " + str ); String nodeLabel = (String)_history.getLast(); _logger.debug( "Reversing a vertex. From: " + (String)_nextVertex.getUserDatum( LABEL_KEY ) + ", to: " + nodeLabel ); Object[] vertices = _graph.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; if ( nodeLabel == (String)vertex.getUserDatum( LABEL_KEY ) ) { try { _nextVertex = vertex; String label = "PressBackButton"; _logger.debug( "Invoke method for edge: \"" + label + "\"" ); invokeMethod( label ); label = nodeLabel; _logger.debug( "Invoke method for vertex: \"" + label + "\"" ); invokeMethod( label ); } catch( GoBackToPreviousVertexException e ) { throw new RuntimeException( "An GoBackToPreviousVertexException was thrown where it should not be thrown." ); } return; } } throw new RuntimeException( "An attempt was made to reverse to vertex: " + nodeLabel + ", and did not find it." ); } } _logger.debug( "Vertex = " + (String)_nextVertex.getUserDatum( LABEL_KEY ) ); outEdges = _nextVertex.getOutEdges().toArray(); _logger.debug( "Number of outgoing edges = " + outEdges.length ); outEdges = shuffle( outEdges ); if ( _shortestPathToVertex == null && _runUntilAllEdgesVisited == true ) { Vector unvisitedEdges = returnUnvisitedEdge(); if ( unvisitedEdges.size() == 0) { _logger.debug( "All edges has been visited!" ); return; } _logger.info( "Found " + unvisitedEdges.size() + " unvisited edges." ); Object[] shuffledList = shuffle( unvisitedEdges.toArray() ); DirectedSparseEdge e = (DirectedSparseEdge)shuffledList[ 0 ]; if ( e == null ) { throw new RuntimeException( "Found an empty edge!" ); } _logger.info( "Selecting edge: " + getCompleteEdgeName( e ) ); _shortestPathToVertex = new DijkstraShortestPath( _graph ).getPath( _nextVertex, e.getSource() ); _shortestPathToVertex.add( e ); _logger.info( "Intend to take the shortest path between: " + (String)_nextVertex.getUserDatum( LABEL_KEY ) + " and " + (String)e.getDest().getUserDatum( LABEL_KEY ) + " (from: " + (String)e.getSource().getUserDatum( LABEL_KEY ) + "), using " + _shortestPathToVertex.size() + " hops." ); String paths = "The route is: "; for (Iterator iter = _shortestPathToVertex.iterator(); iter.hasNext();) { DirectedSparseEdge item = (DirectedSparseEdge) iter.next(); paths += getCompleteEdgeName( item ) + " ==> "; } paths += " Done!"; _logger.info( paths ); } if ( _shortestPathToVertex != null && _shortestPathToVertex.size() > 0 ) { edge = (DirectedSparseEdge)_shortestPathToVertex.get( 0 ); _shortestPathToVertex.remove( 0 ); _logger.debug( "Removed edge: " + getCompleteEdgeName( edge ) + " from the shortest path list, " + _shortestPathToVertex.size() + " hops remaining." ); if ( _shortestPathToVertex.size() == 0 ) { _shortestPathToVertex = null; } } else if ( optimize ) { // Look for an edge that has not been visited yet. for ( int i = 0; i < outEdges.length; i++ ) { edge = (DirectedSparseEdge)outEdges[ i ]; Integer vistited = (Integer)edge.getUserDatum( VISITED_KEY ); if ( vistited.intValue() == 0 ) { if ( _rejectedEdge == edge ) { // This edge has been rejected, because some condition was not fullfilled. // Try with the next edge in the for-loop. // _rejectedEdge has to be set to null, because it can be valid next time. _rejectedEdge = null; } else { _logger.debug( "Found an edge which has not been visited yet: " + getCompleteEdgeName( edge ) ); break; } } edge = null; } if ( edge == null ) { _logger.debug( "All edges has been visited (" + outEdges.length + ")" ); edge = getWeightedEdge( _nextVertex ); } } else { edge = getWeightedEdge( _nextVertex ); } if ( edge == null ) { throw new RuntimeException( "Did not find any edge." ); } _logger.debug( "Edge = \"" + getCompleteEdgeName( edge ) + "\"" ); _prevVertex = _nextVertex; _nextVertex = (DirectedSparseVertex)edge.getDest(); try { String label = (String)edge.getUserDatum( LABEL_KEY ); _logger.debug( "Invoke method for edge: \"" + label + "\"" ); invokeMethod( label ); Integer vistited = (Integer)edge.getUserDatum( VISITED_KEY ); vistited = new Integer( vistited.intValue() + 1 ); edge.setUserDatum( VISITED_KEY, vistited, UserData.SHARED ); label = (String)edge.getDest().getUserDatum( LABEL_KEY ); _logger.debug( "Invoke method for vertex: \"" + label + "\"" ); invokeMethod( label ); vistited = (Integer)edge.getDest().getUserDatum( VISITED_KEY ); vistited = new Integer( vistited.intValue() + 1 ); edge.getDest().setUserDatum( VISITED_KEY, vistited, UserData.SHARED ); if ( ((String)edge.getDest().getUserDatum( LABEL_KEY )).equals( "Stop" ) ) { _logger.debug( "Clearing the history" ); _history.clear(); } if ( edge.containsUserDatumKey( NO_HISTORY ) == false ) { _logger.debug( "Add to history: " + getCompleteEdgeName( edge ) ); _history.add( (String)edge.getDest().getUserDatum( LABEL_KEY ) ); } } catch( GoBackToPreviousVertexException e ) { _logger.debug( "The edge: " + getCompleteEdgeName( edge ) + " can not be run due to unfullfilled conditions." ); _logger.debug( "Trying from vertex: " + (String)_prevVertex.getUserDatum( LABEL_KEY ) + " again." ); _rejectedEdge = edge; _nextVertex = _prevVertex; } }
|
private void executeMethod( boolean optimize ) throws FoundNoEdgeException { DirectedSparseEdge edge = null; Object[] outEdges = null; if ( _nextVertex.containsUserDatumKey( BACK_KEY ) && _history. size() >= 3 ) { Float probability = (Float)_nextVertex.getUserDatum( BACK_KEY ); int index = _radomGenerator.nextInt( 100 ); if ( index < ( probability.floatValue() * 100 ) ) { String str = (String)_history.removeLast(); _logger.debug( "Remove from history: " + str ); String nodeLabel = (String)_history.getLast(); _logger.debug( "Reversing a vertex. From: " + (String)_nextVertex.getUserDatum( LABEL_KEY ) + ", to: " + nodeLabel ); Object[] vertices = _graph.getVertices().toArray(); for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; if ( nodeLabel == (String)vertex.getUserDatum( LABEL_KEY ) ) { try { _nextVertex = vertex; String label = "PressBackButton"; _logger.debug( "Invoke method for edge: \"" + label + "\"" ); invokeMethod( label ); label = nodeLabel; _logger.debug( "Invoke method for vertex: \"" + label + "\"" ); invokeMethod( label ); } catch( GoBackToPreviousVertexException e ) { throw new RuntimeException( "An GoBackToPreviousVertexException was thrown where it should not be thrown." ); } return; } } throw new RuntimeException( "An attempt was made to reverse to vertex: " + nodeLabel + ", and did not find it." ); } } _logger.debug( "Vertex = " + (String)_nextVertex.getUserDatum( LABEL_KEY ) ); outEdges = _nextVertex.getOutEdges().toArray(); _logger.debug( "Number of outgoing edges = " + outEdges.length ); outEdges = shuffle( outEdges ); if ( _shortestPathToVertex == null && _runUntilAllEdgesVisited == true ) { Vector unvisitedEdges = returnUnvisitedEdge(); if ( unvisitedEdges.size() == 0) { _logger.debug( "All edges has been visited!" ); return; } _logger.info( "Found " + unvisitedEdges.size() + " unvisited edges." ); Object[] shuffledList = shuffle( unvisitedEdges.toArray() ); DirectedSparseEdge e = (DirectedSparseEdge)shuffledList[ 0 ]; if ( e == null ) { throw new RuntimeException( "Found an empty edge!" ); } _logger.info( "Selecting edge: " + getCompleteEdgeName( e ) ); _shortestPathToVertex = new DijkstraShortestPath( _graph ).getPath( _nextVertex, e.getSource() ); _shortestPathToVertex.add( e ); _logger.info( "Intend to take the shortest path between: " + (String)_nextVertex.getUserDatum( LABEL_KEY ) + " and " + (String)e.getDest().getUserDatum( LABEL_KEY ) + " (from: " + (String)e.getSource().getUserDatum( LABEL_KEY ) + "), using " + _shortestPathToVertex.size() + " hops." ); String paths = "The route is: "; for (Iterator iter = _shortestPathToVertex.iterator(); iter.hasNext();) { DirectedSparseEdge item = (DirectedSparseEdge) iter.next(); paths += getCompleteEdgeName( item ) + " ==> "; } paths += " Done!"; _logger.info( paths ); } if ( _shortestPathToVertex != null && _shortestPathToVertex.size() > 0 ) { edge = (DirectedSparseEdge)_shortestPathToVertex.get( 0 ); _shortestPathToVertex.remove( 0 ); _logger.debug( "Removed edge: " + getCompleteEdgeName( edge ) + " from the shortest path list, " + _shortestPathToVertex.size() + " hops remaining." ); if ( _shortestPathToVertex.size() == 0 ) { _shortestPathToVertex = null; } } else if ( optimize ) { // Look for an edge that has not been visited yet. for ( int i = 0; i < outEdges.length; i++ ) { edge = (DirectedSparseEdge)outEdges[ i ]; Integer vistited = (Integer)edge.getUserDatum( VISITED_KEY ); if ( vistited.intValue() == 0 ) { if ( _rejectedEdge == edge ) { // This edge has been rejected, because some condition was not fullfilled. // Try with the next edge in the for-loop. // _rejectedEdge has to be set to null, because it can be valid next time. _rejectedEdge = null; } else { _logger.debug( "Found an edge which has not been visited yet: " + getCompleteEdgeName( edge ) ); break; } } edge = null; } if ( edge == null ) { _logger.debug( "All edges has been visited (" + outEdges.length + ")" ); edge = getWeightedEdge( _nextVertex ); } } else { edge = getWeightedEdge( _nextVertex ); } if ( edge == null ) { throw new RuntimeException( "Did not find any edge." ); } _logger.debug( "Edge = \"" + getCompleteEdgeName( edge ) + "\"" ); _prevVertex = _nextVertex; _nextVertex = (DirectedSparseVertex)edge.getDest(); try { String label = (String)edge.getUserDatum( LABEL_KEY ); _logger.debug( "Invoke method for edge: \"" + label + "\"" ); invokeMethod( label ); Integer vistited = (Integer)edge.getUserDatum( VISITED_KEY ); vistited = new Integer( vistited.intValue() + 1 ); edge.setUserDatum( VISITED_KEY, vistited, UserData.SHARED ); label = (String)edge.getDest().getUserDatum( LABEL_KEY ); _logger.debug( "Invoke method for vertex: \"" + label + "\"" ); invokeMethod( label ); vistited = (Integer)edge.getDest().getUserDatum( VISITED_KEY ); vistited = new Integer( vistited.intValue() + 1 ); edge.getDest().setUserDatum( VISITED_KEY, vistited, UserData.SHARED ); if ( ((String)edge.getDest().getUserDatum( LABEL_KEY )).equals( "Stop" ) ) { _logger.debug( "Clearing the history" ); _history.clear(); } if ( edge.containsUserDatumKey( NO_HISTORY ) == false ) { _logger.debug( "Add to history: " + getCompleteEdgeName( edge ) ); _history.add( (String)edge.getDest().getUserDatum( LABEL_KEY ) ); } } catch( GoBackToPreviousVertexException e ) { _logger.debug( "The edge: " + getCompleteEdgeName( edge ) + " can not be run due to unfullfilled conditions." ); _logger.debug( "Trying from vertex: " + (String)_prevVertex.getUserDatum( LABEL_KEY ) + " again." ); _rejectedEdge = edge; _nextVertex = _prevVertex; } }
| 3,239,967 |
private void invokeMethod( String method ) throws GoBackToPreviousVertexException { Class cls = _object.getClass(); try { if ( method.compareTo( "" ) != 0 ) { Method meth = cls.getMethod( method, null ); meth.invoke( _object, null ); } } catch( NoSuchMethodException e ) { _logger.error( e ); _logger.error( "Try to invoke method: " + method ); throw new RuntimeException( "The methoden is not defined: " + method ); } catch( java.lang.reflect.InvocationTargetException e ) { if ( e.getTargetException().getClass() == GoBackToPreviousVertexException.class ) { throw new GoBackToPreviousVertexException(); } _logger.error( e.getCause().getMessage() ); e.getCause().printStackTrace(); throw new RuntimeException( e.getCause().getMessage() ); } catch( Exception e ) { _logger.error( e ); e.printStackTrace(); throw new RuntimeException( "Abrupt end of execution: " + e.getMessage() ); } }
|
private void invokeMethod( String method ) throws GoBackToPreviousVertexException { Class cls = _object.getClass(); try { if ( method.compareTo( "" ) != 0 ) { Method meth = cls.getMethod( method, null ); meth.invoke( _object, null ); } } catch( NoSuchMethodException e ) { _logger.error( e ); _logger.error( "Try to invoke method: " + method ); throw new RuntimeException( "The methoden is not defined: " + method ); } catch( java.lang.reflect.InvocationTargetException e ) { if ( e.getTargetException().getClass() == GoBackToPreviousVertexException.class ) { throw new GoBackToPreviousVertexException(); } _logger.error( e.getCause().getMessage() ); e.getCause().printStackTrace(); throw new RuntimeException( e.getCause().getMessage() ); } catch( Exception e ) { _logger.error( e ); e.printStackTrace(); throw new RuntimeException( "Abrupt end of execution: " + e.getMessage() ); } }
| 3,239,968 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
|
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
| 3,239,969 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
|
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
| 3,239,970 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
|
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
| 3,239,971 |
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
|
private SparseGraph parseFile( String fileName ) { SparseGraph graph = new SparseGraph(); graph.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); try { _logger.info( "Parsing file: " + fileName ); _doc = _parser.build( fileName ); // Parse all vertices (nodes) Iterator iter = _doc.getDescendants( new ElementFilter( "node" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; if ( element.getAttributeValue( "yfiles.foldertype" ) != null ) { _logger.debug( "Excluded node: " + element.getAttributeValue( "yfiles.foldertype" ) ); continue; } _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "NodeLabel" ) ); while ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { Element nodeLabel = (Element)o2; _logger.debug( "Full name: " + nodeLabel.getQualifiedName() ); _logger.debug( "Name: " + nodeLabel.getTextTrim() ); DirectedSparseVertex v = (DirectedSparseVertex) graph.addVertex( new DirectedSparseVertex() ); v.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); v.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); v.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); String str = nodeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label; if ( m.find( )) { label = m.group( 1 ); v.addUserDatum( LABEL_KEY, label, UserData.SHARED ); } else { throw new RuntimeException( "Label must be defined." ); } _logger.debug( "Added node: " + v.getUserDatum( LABEL_KEY ) ); // If merge is defined, find it... // If defined, it means that the node will be merged with all other nodes wit the same name, // but not replaced by any subgraphs p = Pattern.compile( "(MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found MERGE for edge: " + label ); } // If no merge is defined, find it... // If defined, it means that when merging graphs, this specific vertex will not be merged // or replaced by any subgraphs p = Pattern.compile( "(NO_MERGE)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { v.addUserDatum( NO_MERGE, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found NO_MERGE for edge: " + label ); } // NOTE: Only for html applications // In browsers, the usage of the 'Back'-button can be used. // If defined, with a value value, which depicts the probability for the edge // to be executed, tha back-button will be pressed in the browser. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(back=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find( ) ) { Float probability; String value = m.group( 2 ); try { probability = Float.valueOf( value.trim() ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", back is not a correct float value: " + error.toString() ); } v.addUserDatum( BACK_KEY, probability, UserData.SHARED ); } } } } } Object[] vertices = graph.getVertices().toArray(); // Parse all edges (arrows or transtitions) iter = _doc.getDescendants( new ElementFilter( "edge" ) ); while ( iter.hasNext() ) { Object o = iter.next(); if ( o instanceof Element ) { Element element = (Element)o; _logger.debug( "id: " + element.getAttributeValue( "id" ) ); Iterator iter2 = element.getDescendants( new ElementFilter( "EdgeLabel" ) ); Element edgeLabel = null; if ( iter2.hasNext() ) { Object o2 = iter2.next(); if ( o2 instanceof Element ) { edgeLabel = (Element)o2; _logger.debug( "Full name: " + edgeLabel.getQualifiedName() ); _logger.debug( "Name: " + edgeLabel.getTextTrim() ); } } _logger.debug( "source: " + element.getAttributeValue( "source" ) ); _logger.debug( "target: " + element.getAttributeValue( "target" ) ); DirectedSparseVertex source = null; DirectedSparseVertex dest = null; for ( int i = 0; i < vertices.length; i++ ) { DirectedSparseVertex vertex = (DirectedSparseVertex)vertices[ i ]; // Find source vertex if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "source" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { source = vertex; } if ( vertex.getUserDatum( ID_KEY ).equals( element.getAttributeValue( "target" ) ) && vertex.getUserDatum( FILE_KEY ).equals( fileName ) ) { dest = vertex; } } if ( source == null ) { String msg = "Could not find starting node for edge. Name: " + element.getAttributeValue( "source" ); _logger.error( msg ); throw new RuntimeException( msg ); } if ( dest == null ) { String msg = "Could not find end node for edge. Name: " + element.getAttributeValue( "target" ); _logger.error( msg ); throw new RuntimeException( msg ); } DirectedSparseEdge e = new DirectedSparseEdge( source, dest ); graph.addEdge( e ); e.addUserDatum( ID_KEY, element.getAttributeValue( "id" ), UserData.SHARED ); e.addUserDatum( FILE_KEY, fileName, UserData.SHARED ); if ( edgeLabel != null ) { String str = edgeLabel.getTextTrim(); Pattern p = Pattern.compile( "(.*)", Pattern.MULTILINE ); Matcher m = p.matcher( str ); String label = null; if ( m.find() ) { label = m.group( 1 ); e.addUserDatum( LABEL_KEY, label, UserData.SHARED ); _logger.debug( "Found label= " + label + " for edge id: " + edgeLabel.getQualifiedName() ); } else { throw new RuntimeException( "Label for edge must be defined." ); } // If weight is defined, find it... // weight must be associated with a value, which depicts the probability for the edge // to be executed. // A value of 0.05 is the same as 5% chance of going down this road. p = Pattern.compile( "(weight=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { Float weight; String value = m.group( 2 ); try { weight = Float.valueOf( value.trim() ); _logger.debug( "Found weight= " + weight + " for edge: " + label ); } catch ( NumberFormatException error ) { throw new RuntimeException( "For label: " + label + ", weight is not a correct float value: " + error.toString() ); } e.addUserDatum( WEIGHT_KEY, weight, UserData.SHARED ); } // If No_history is defined, find it... // If defined, it means that when executing this edge, it shall not // be added to the history list of passed edgses. p = Pattern.compile( "(No_history)", Pattern.MULTILINE ); m = p.matcher( str ); if ( m.find() ) { e.addUserDatum( NO_HISTORY, m.group( 1 ), UserData.SHARED ); _logger.debug( "Found No_history for edge: " + label ); } // If condition used defined, find it... p = Pattern.compile( "(if: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); HashMap conditions = null; while ( m.find( ) ) { if ( conditions == null ) { conditions = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); conditions.put( variable, state ); _logger.debug( "Condition: " + variable + " = " + state ); } if ( conditions != null ) { e.addUserDatum( CONDITION_KEY, conditions, UserData.SHARED ); } // If state are defined, find them... HashMap states = null; p = Pattern.compile( "(state: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( states == null ) { states = new HashMap(); } String variable = m.group( 2 ); Boolean state = Boolean.valueOf( m.group( 3 ) ); states.put( variable, state ); _logger.debug( "State: " + variable + " = " + state ); } if ( states != null ) { e.addUserDatum( STATE_KEY, states, UserData.SHARED ); } // If string variables are defined, find them... HashMap variables = null; p = Pattern.compile( "(string: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); String variable = m.group( 3 ); variables.put( variableLabel, variable ); _logger.debug( "String variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(integer: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Integer variable = Integer.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Integer variable: " + variableLabel + " = " + variable ); } // If integer variables are defined, find them... p = Pattern.compile( "(float: (.*)=(.*))", Pattern.MULTILINE ); m = p.matcher( str ); while ( m.find( ) ) { if ( variables == null ) { variables = new HashMap(); } String variableLabel = m.group( 2 ); Float variable = Float.valueOf( m.group( 3 ) ); variables.put( variableLabel, variable ); _logger.debug( "Float variable: " + variableLabel + " = " + variable ); } if ( variables != null ) { e.addUserDatum( VARIABLE_KEY, variables, UserData.SHARED ); } } e.addUserDatum( VISITED_KEY, new Integer( 0 ), UserData.SHARED ); _logger.debug( "Adderade edge: \"" + e.getUserDatum( LABEL_KEY ) + "\"" ); } } } catch ( JDOMException e ) { _logger.error( e ); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } catch ( IOException e ) { e.printStackTrace(); throw new RuntimeException( "Kunde inte skanna filen: " + fileName ); } return graph; }
| 3,239,972 |
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
|
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
| 3,239,973 |
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
|
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
| 3,239,974 |
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
|
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
| 3,239,975 |
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
|
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
| 3,239,976 |
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
|
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
| 3,239,977 |
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
|
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
| 3,239,978 |
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
|
public void writeGraph( String mergedGraphml_ ) { StringBuffer sourceFile = new StringBuffer(); try { FileWriter file = new FileWriter( mergedGraphml_ ); sourceFile.append( "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" ); sourceFile.append( "<graphml xmlns=\"http://graphml.graphdrawing.org/xmlns/graphml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd\" xmlns:y=\"http://www.yworks.com/xml/graphml\">\n" ); sourceFile.append( " <key id=\"d0\" for=\"node\" yfiles.type=\"nodegraphics\"/>\n" ); sourceFile.append( " <key id=\"d1\" for=\"edge\" yfiles.type=\"edgegraphics\"/>\n" ); sourceFile.append( " <graph id=\"G\" edgedefault=\"directed\">\n" ); int numVertices = _graph.getVertices().size(); Indexer id = Indexer.getAndUpdateIndexer( _graph ); for ( int i = 0; i < numVertices; i++ ) { Vertex v = (Vertex) id.getVertex(i); int vId = i+1; sourceFile.append( " <node id=\"n" + vId + "\">\n" ); sourceFile.append( " <data key=\"d0\" >\n" ); sourceFile.append( " <y:ShapeNode >\n" ); sourceFile.append( " <y:Geometry x=\"241.875\" y=\"158.701171875\" width=\"95.0\" height=\"30.0\"/>\n" ); sourceFile.append( " <y:Fill color=\"#CCCCFF\" transparent=\"false\"/>\n" ); sourceFile.append( " <y:BorderStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:NodeLabel x=\"1.5\" y=\"5.6494140625\" width=\"92.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"internal\" modelPosition=\"c\" autoSizePolicy=\"content\">" + v.getUserDatum( LABEL_KEY ) + "</y:NodeLabel>\n" ); sourceFile.append( " <y:Shape type=\"rectangle\"/>\n" ); sourceFile.append( " </y:ShapeNode>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </node>\n" ); } int i = 0; for ( Iterator edgeIterator = _graph.getEdges().iterator(); edgeIterator.hasNext(); ) { Edge e = (Edge) edgeIterator.next(); Pair p = e.getEndpoints(); Vertex src = (Vertex) p.getFirst(); Vertex dest = (Vertex) p.getSecond(); int srcId = id.getIndex(src)+1; int destId = id.getIndex(dest)+1; int nId = ++i; sourceFile.append( " <edge id=\"" + nId + "\" source=\"n" + srcId + "\" target=\"n" + destId + "\">\n" ); sourceFile.append( " <data key=\"d1\" >\n" ); sourceFile.append( " <y:PolyLineEdge >\n" ); sourceFile.append( " <y:Path sx=\"-23.75\" sy=\"15.0\" tx=\"-23.75\" ty=\"-15.0\">\n" ); sourceFile.append( " <y:Point x=\"273.3125\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"95.0\"/>\n" ); sourceFile.append( " <y:Point x=\"209.5625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " <y:Point x=\"265.625\" y=\"143.701171875\"/>\n" ); sourceFile.append( " </y:Path>\n" ); sourceFile.append( " <y:LineStyle type=\"line\" width=\"1.0\" color=\"#000000\" />\n" ); sourceFile.append( " <y:Arrows source=\"none\" target=\"standard\"/>\n" ); sourceFile.append( " <y:EdgeLabel x=\"-148.25\" y=\"30.000000000000014\" width=\"169.0\" height=\"18.701171875\" visible=\"true\" alignment=\"center\" fontFamily=\"Dialog\" fontSize=\"12\" fontStyle=\"plain\" textColor=\"#000000\" modelName=\"free\" modelPosition=\"anywhere\" preferredPlacement=\"on_edge\" distance=\"2.0\" ratio=\"0.5\">" + e.getUserDatum( LABEL_KEY ) + "</y:EdgeLabel>\n" ); sourceFile.append( " <y:BendStyle smoothed=\"false\"/>\n" ); sourceFile.append( " </y:PolyLineEdge>\n" ); sourceFile.append( " </data>\n" ); sourceFile.append( " </edge>\n" ); } sourceFile.append( " </graph>\n" ); sourceFile.append( "</graphml>\n" ); file.write( sourceFile.toString() ); file.flush(); _logger.info( "Wrote: " + mergedGraphml_ ); } catch (IOException e) { e.printStackTrace(); } }
| 3,239,979 |
PropertyTabSheet(final Panel panel, final boolean styleProperties) { super(styleProperties ? "Styles" : "Properties"); final GridBox gb = initGridBox(); gb.setPosition(GAP, GAP); final Divider div = new Divider(); div.setX(GAP); div.setHeight(6); final Label lbl = new Label("Edit Property Value:"); lbl.setAlignX(AlignX.RIGHT); lbl.setX(GAP); lbl.setHeight(EDITOR_HEIGHT); editor = defaultEditor = new TextField(); editor.setVisible(false); editor.setHeight(EDITOR_HEIGHT); final Button b = new Button("Apply"); b.setEnabled(false); b.setSize(90, EDITOR_HEIGHT); b.setStandard(true); addPropertyChangeListener(Main.SIZE_ARY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (getInnerHeight() > 20 && getInnerWidth() > 20) { gb.setSize(getInnerWidth() - GAP * 2, getInnerHeight() - GAP * 2 - div.getHeight() - editor.getHeight()); div.setY(gb.getY() + gb.getHeight()); div.setWidth(gb.getWidth()); int y = div.getY() + div.getHeight(); lbl.setY(y); int width = (gb.getWidth() - GAP * 4 - b.getWidth()) / 2; lbl.setWidth(width); editor.setPosition(lbl.getX() + lbl.getWidth() + GAP, y); editor.setWidth(width); b.setPosition(editor.getX() + editor.getWidth() + GAP, y); } } }); gb.addPropertyChangeListener(GridBox.Row.PROPERTY_ROW_SELECTED, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { GridBox.Row row = gb.getSelectedRow(); editor.setVisible(false); MaskEditorComponent ed; String value; if (row == null) { ed = defaultEditor; value = ""; b.setEnabled(false); } else { Property prop = (Property)row.get(COL_PROPERTY); ed = propToEditor.get(prop); if (ed == null) propToEditor.put(prop, ed = prop.newEditor()); value = row.get(COL_VALUE).toString(); b.setEnabled(true); } ed.setBounds(editor.getX(), editor.getY(), editor.getWidth(), editor.getHeight()); ed.setText(value); ed.setVisible(true); if (ed.getParent() == null) { int index = getChildren().indexOf(b); getChildren().add(index, ed); } editor = ed; } }); b.addActionListener(Button.ACTION_CLICK, new ActionListener() { public void actionPerformed(ActionEvent ev) { GridBox.Row row = gb.getSelectedRow(); if (row != null) { row.set(COL_VALUE, editor.getText()); Property prop = (Property)row.get(COL_PROPERTY); if (prop != null && panel.getChildren().size() > 0) { for (int i = 0, cnt = panel.getChildren().size(); i < cnt; i++) { Component comp = panel.getChildren().get(i); String name = prop.getName(); if (comp instanceof RadioButton) { String value = editor.getText(); if (i > 0 && name.equals(RadioButton.PROPERTY_CHECKED)) continue; else if (name.equals(TextComponent.PROPERTY_TEXT)) value += (i + 1); else if (name.equals(Component.PROPERTY_X) || name.equals(name.equals(Component.PROPERTY_Y))) { int oldValue = (Integer)prop.getValue(comp); oldValue += Integer.parseInt(value) - oldValue; value = String.valueOf(oldValue); } prop.setValue(comp, value); } else { prop.setValue(comp, editor.getText()); } } } } } }); panel.addItemChangeListener(new ItemChangeListener() { public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } } }); getChildren().add(gb); getChildren().add(div); getChildren().add(lbl); getChildren().add(editor); getChildren().add(b); }
|
PropertyTabSheet(final Panel panel, final boolean styleProperties) { super(styleProperties ? "Styles" : "Properties"); final GridBox gb = initGridBox(); gb.setPosition(GAP, GAP); final Divider div = new Divider(); div.setX(GAP); div.setHeight(6); final Label lbl = new Label("Edit Property Value:"); lbl.setAlignX(AlignX.RIGHT); lbl.setX(GAP); lbl.setHeight(EDITOR_HEIGHT); editor = defaultEditor = new TextField(); editor.setVisible(false); editor.setHeight(EDITOR_HEIGHT); final Button b = new Button("Apply"); b.setEnabled(false); b.setSize(90, EDITOR_HEIGHT); b.setStandard(true); addPropertyChangeListener(Main.SIZE_ARY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (getInnerHeight() > 20 && getInnerWidth() > 20) { gb.setSize(getInnerWidth() - GAP * 2, getInnerHeight() - GAP * 2 - div.getHeight() - editor.getHeight()); div.setY(gb.getY() + gb.getHeight()); div.setWidth(gb.getWidth()); int y = div.getY() + div.getHeight(); lbl.setY(y); int width = (gb.getWidth() - GAP * 4 - b.getWidth()) / 2; lbl.setWidth(width); editor.setPosition(lbl.getX() + lbl.getWidth() + GAP, y); editor.setWidth(width); b.setPosition(editor.getX() + editor.getWidth() + GAP, y); } } }); gb.addPropertyChangeListener(GridBox.Row.PROPERTY_ROW_SELECTED, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { GridBox.Row row = gb.getSelectedRow(); editor.setVisible(false); MaskEditorComponent ed; String value; if (row == null) { ed = defaultEditor; value = ""; b.setEnabled(false); } else { Property prop = (Property)row.get(COL_PROPERTY); ed = propToEditor.get(prop); if (ed == null) propToEditor.put(prop, ed = prop.newEditor()); value = row.get(COL_VALUE).toString(); b.setEnabled(true); } ed.setBounds(editor.getX(), editor.getY(), editor.getWidth(), editor.getHeight()); ed.setText(value); ed.setVisible(true); if (ed.getParent() == null) { int index = getChildren().indexOf(b); getChildren().add(index, ed); } editor = ed; } }); b.addActionListener(Button.ACTION_CLICK, new ActionListener() { public void actionPerformed(ActionEvent ev) { GridBox.Row row = gb.getSelectedRow(); if (row != null) { row.set(COL_VALUE, editor.getText()); Property prop = (Property)row.get(COL_PROPERTY); if (prop != null && panel.getChildren().size() > 0) { for (int i = 0, cnt = panel.getChildren().size(); i < cnt; i++) { Component comp = panel.getChildren().get(i); String name = prop.getName(); if (comp instanceof RadioButton) { String value = editor.getText(); if (i > 0 && name.equals(RadioButton.PROPERTY_CHECKED)) continue; else if (name.equals(TextComponent.PROPERTY_TEXT)) value += (i + 1); else if (name.equals(Component.PROPERTY_X) || name.equals(name.equals(Component.PROPERTY_Y))) { int oldValue = (Integer)prop.getValue(comp); oldValue += Integer.parseInt(value) - oldValue; value = String.valueOf(oldValue); } prop.setValue(comp, value); } else { prop.setValue(comp, editor.getText()); } } } } } }); panel.addItemChangeListener(new ItemChangeListener() { public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } } }); getChildren().add(gb); getChildren().add(div); getChildren().add(lbl); getChildren().add(editor); getChildren().add(b); }
| 3,239,980 |
PropertyTabSheet(final Panel panel, final boolean styleProperties) { super(styleProperties ? "Styles" : "Properties"); final GridBox gb = initGridBox(); gb.setPosition(GAP, GAP); final Divider div = new Divider(); div.setX(GAP); div.setHeight(6); final Label lbl = new Label("Edit Property Value:"); lbl.setAlignX(AlignX.RIGHT); lbl.setX(GAP); lbl.setHeight(EDITOR_HEIGHT); editor = defaultEditor = new TextField(); editor.setVisible(false); editor.setHeight(EDITOR_HEIGHT); final Button b = new Button("Apply"); b.setEnabled(false); b.setSize(90, EDITOR_HEIGHT); b.setStandard(true); addPropertyChangeListener(Main.SIZE_ARY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (getInnerHeight() > 20 && getInnerWidth() > 20) { gb.setSize(getInnerWidth() - GAP * 2, getInnerHeight() - GAP * 2 - div.getHeight() - editor.getHeight()); div.setY(gb.getY() + gb.getHeight()); div.setWidth(gb.getWidth()); int y = div.getY() + div.getHeight(); lbl.setY(y); int width = (gb.getWidth() - GAP * 4 - b.getWidth()) / 2; lbl.setWidth(width); editor.setPosition(lbl.getX() + lbl.getWidth() + GAP, y); editor.setWidth(width); b.setPosition(editor.getX() + editor.getWidth() + GAP, y); } } }); gb.addPropertyChangeListener(GridBox.Row.PROPERTY_ROW_SELECTED, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { GridBox.Row row = gb.getSelectedRow(); editor.setVisible(false); MaskEditorComponent ed; String value; if (row == null) { ed = defaultEditor; value = ""; b.setEnabled(false); } else { Property prop = (Property)row.get(COL_PROPERTY); ed = propToEditor.get(prop); if (ed == null) propToEditor.put(prop, ed = prop.newEditor()); value = row.get(COL_VALUE).toString(); b.setEnabled(true); } ed.setBounds(editor.getX(), editor.getY(), editor.getWidth(), editor.getHeight()); ed.setText(value); ed.setVisible(true); if (ed.getParent() == null) { int index = getChildren().indexOf(b); getChildren().add(index, ed); } editor = ed; } }); b.addActionListener(Button.ACTION_CLICK, new ActionListener() { public void actionPerformed(ActionEvent ev) { GridBox.Row row = gb.getSelectedRow(); if (row != null) { row.set(COL_VALUE, editor.getText()); Property prop = (Property)row.get(COL_PROPERTY); if (prop != null && panel.getChildren().size() > 0) { for (int i = 0, cnt = panel.getChildren().size(); i < cnt; i++) { Component comp = panel.getChildren().get(i); String name = prop.getName(); if (comp instanceof RadioButton) { String value = editor.getText(); if (i > 0 && name.equals(RadioButton.PROPERTY_CHECKED)) continue; else if (name.equals(TextComponent.PROPERTY_TEXT)) value += (i + 1); else if (name.equals(Component.PROPERTY_X) || name.equals(name.equals(Component.PROPERTY_Y))) { int oldValue = (Integer)prop.getValue(comp); oldValue += Integer.parseInt(value) - oldValue; value = String.valueOf(oldValue); } prop.setValue(comp, value); } else { prop.setValue(comp, editor.getText()); } } } } } }); panel.addItemChangeListener(new ItemChangeListener() { public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } } }); getChildren().add(gb); getChildren().add(div); getChildren().add(lbl); getChildren().add(editor); getChildren().add(b); }
|
PropertyTabSheet(final Panel panel, final boolean styleProperties) { super(styleProperties ? "Styles" : "Properties"); final GridBox gb = initGridBox(); gb.setPosition(GAP, GAP); final Divider div = new Divider(); div.setX(GAP); div.setHeight(6); final Label lbl = new Label("Edit Property Value:"); lbl.setAlignX(AlignX.RIGHT); lbl.setX(GAP); lbl.setHeight(EDITOR_HEIGHT); editor = defaultEditor = new TextField(); editor.setVisible(false); editor.setHeight(EDITOR_HEIGHT); final Button b = new Button("Apply"); b.setEnabled(false); b.setSize(90, EDITOR_HEIGHT); b.setStandard(true); addPropertyChangeListener(Main.SIZE_ARY, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { if (getInnerHeight() > 20 && getInnerWidth() > 20) { gb.setSize(getInnerWidth() - GAP * 2, getInnerHeight() - GAP * 2 - div.getHeight() - editor.getHeight()); div.setY(gb.getY() + gb.getHeight()); div.setWidth(gb.getWidth()); int y = div.getY() + div.getHeight(); lbl.setY(y); int width = (gb.getWidth() - GAP * 4 - b.getWidth()) / 2; lbl.setWidth(width); editor.setPosition(lbl.getX() + lbl.getWidth() + GAP, y); editor.setWidth(width); b.setPosition(editor.getX() + editor.getWidth() + GAP, y); } } }); gb.addPropertyChangeListener(GridBox.Row.PROPERTY_ROW_SELECTED, new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent ev) { GridBox.Row row = gb.getSelectedRow(); editor.setVisible(false); MaskEditorComponent ed; String value; if (row == null) { ed = defaultEditor; value = ""; b.setEnabled(false); } else { Property prop = (Property)row.get(COL_PROPERTY); ed = propToEditor.get(prop); if (ed == null) propToEditor.put(prop, ed = prop.newEditor()); value = row.get(COL_VALUE).toString(); b.setEnabled(true); } ed.setBounds(editor.getX(), editor.getY(), editor.getWidth(), editor.getHeight()); ed.setText(value); ed.setVisible(true); if (ed.getParent() == null) { int index = getChildren().indexOf(b); getChildren().add(index, ed); } editor = ed; } }); b.addActionListener(Button.ACTION_CLICK, new ActionListener() { public void actionPerformed(ActionEvent ev) { GridBox.Row row = gb.getSelectedRow(); if (row != null) { row.set(COL_VALUE, editor.getText()); Property prop = (Property)row.get(COL_PROPERTY); if (prop != null && panel.getChildren().size() > 0) { for (int i = 0, cnt = panel.getChildren().size(); i < cnt; i++) { Component comp = panel.getChildren().get(i); String name = prop.getName(); if (comp instanceof RadioButton) { String value = editor.getText(); if (i > 0 && name.equals(RadioButton.PROPERTY_CHECKED)) continue; else if (name.equals(TextComponent.PROPERTY_TEXT)) value += (i + 1); else if (name.equals(Component.PROPERTY_X) || name.equals(name.equals(Component.PROPERTY_Y))) { int oldValue = (Integer)prop.getValue(comp); oldValue += Integer.parseInt(value) - oldValue; value = String.valueOf(oldValue); } prop.setValue(comp, value); } else { prop.setValue(comp, editor.getText()); } } } } } }); panel.addItemChangeListener(new ItemChangeListener() { public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } } }); getChildren().add(gb); getChildren().add(div); getChildren().add(lbl); getChildren().add(editor); getChildren().add(b); }
| 3,239,981 |
public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } }
|
public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } }
| 3,239,983 |
public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } }
|
public void itemChange(ItemChangeEvent ev) { if (ev.getType() == ItemChangeEvent.Type.ADD && panel.getChildren().size() == 1) { gb.getRows().clear(); Component comp = panel.getChildren().get(0); for (Property prop : Property.values()) { if (prop.isValidFor(comp) && prop.isStyleProperty() == styleProperties) { GridBox.Row row = new GridBox.Row(); row.add(Main.getSimpleClassName(prop.getType()).replace('$', '.')); row.add(prop.getName()); row.add(prop.getDefaultValue(comp)); row.add(prop == Property.FX_VISIBLE_CHANGE ? FX.Type.NONE : prop.getValue(comp)); row.add(prop); gb.getRows().add(row); } } } }
| 3,239,984 |
public boolean autodetect() { Vector items = new Vector(); /* * Check if the user has entered data into the ComboBox and add it to the Itemlist */ String selected = (String) this.pathComboBox.getSelectedItem(); if (selected == null) { return false; } boolean found = false; for (int x = 0; x < this.pathComboBox.getItemCount(); x++) { if (((String) this.pathComboBox.getItemAt(x)).equals(selected)) { found = true; } } if (!found) { // System.out.println("Not found in Itemlist"); this.pathComboBox.addItem(this.pathComboBox.getSelectedItem()); } // Checks whether a placeholder item is in the combobox // and resolve the pathes automatically: // /usr/lib/* searches all folders in usr/lib to find // /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (path.endsWith("*")) { path = path.substring(0, path.length() - 1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x = 0; x < subdirs.length; x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches(search)) { items.add(search); } } } } else { if (this.pathMatches(path)) { items.add(path); } } } // Make the enties in the vector unique items = new Vector(new HashSet(items)); // Now clear the combobox and add the items out of the newly // generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i = 0; i < items.size(); i++) { this.pathComboBox.addItem(vs.substitute((String) items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (this.pathMatches(path)) { this.pathComboBox.setSelectedIndex(i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches((String) this.pathComboBox.getSelectedItem())) { return true; } return false; }
|
public boolean autodetect() { Vector items = new Vector(); /* * Check if the user has entered data into the ComboBox and add it to the Itemlist */ String selected = (String) this.pathComboBox.getSelectedItem(); if (selected == null) { return false; } boolean found = false; for (int x = 0; x < this.pathComboBox.getItemCount(); x++) { if (((String) this.pathComboBox.getItemAt(x)).equals(selected)) { found = true; } } if (!found) { // System.out.println("Not found in Itemlist"); this.pathComboBox.addItem(this.pathComboBox.getSelectedItem()); } // Checks whether a placeholder item is in the combobox // and resolve the pathes automatically: // /usr/lib/* searches all folders in usr/lib to find // /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (path.endsWith("*")) { path = path.substring(0, path.length() - 1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x = 0; x < subdirs.length; x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches(search)) { items.add(search); } } } } else { if (this.pathMatches(path)) { items.add(path); } } } // Make the enties in the vector unique items = new Vector(new HashSet(items)); // Now clear the combobox and add the items out of the newly // generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i = 0; i < items.size(); i++) { this.pathComboBox.addItem(vs.substitute((String) items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (this.pathMatches(path)) { this.pathComboBox.setSelectedIndex(i); return true; } } // if the user entered something else, it's not listed as an item return this.pathMatches((String) this.pathComboBox.getSelectedItem()); return false; }
| 3,239,985 |
public boolean autodetect() { Vector items = new Vector(); /* * Check if the user has entered data into the ComboBox and add it to the Itemlist */ String selected = (String) this.pathComboBox.getSelectedItem(); if (selected == null) { return false; } boolean found = false; for (int x = 0; x < this.pathComboBox.getItemCount(); x++) { if (((String) this.pathComboBox.getItemAt(x)).equals(selected)) { found = true; } } if (!found) { // System.out.println("Not found in Itemlist"); this.pathComboBox.addItem(this.pathComboBox.getSelectedItem()); } // Checks whether a placeholder item is in the combobox // and resolve the pathes automatically: // /usr/lib/* searches all folders in usr/lib to find // /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (path.endsWith("*")) { path = path.substring(0, path.length() - 1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x = 0; x < subdirs.length; x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches(search)) { items.add(search); } } } } else { if (this.pathMatches(path)) { items.add(path); } } } // Make the enties in the vector unique items = new Vector(new HashSet(items)); // Now clear the combobox and add the items out of the newly // generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i = 0; i < items.size(); i++) { this.pathComboBox.addItem(vs.substitute((String) items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (this.pathMatches(path)) { this.pathComboBox.setSelectedIndex(i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches((String) this.pathComboBox.getSelectedItem())) { return true; } return false; }
|
public boolean autodetect() { Vector items = new Vector(); /* * Check if the user has entered data into the ComboBox and add it to the Itemlist */ String selected = (String) this.pathComboBox.getSelectedItem(); if (selected == null) { } boolean found = false; for (int x = 0; x < this.pathComboBox.getItemCount(); x++) { if (((String) this.pathComboBox.getItemAt(x)).equals(selected)) { found = true; } } if (!found) { // System.out.println("Not found in Itemlist"); this.pathComboBox.addItem(this.pathComboBox.getSelectedItem()); } // Checks whether a placeholder item is in the combobox // and resolve the pathes automatically: // /usr/lib/* searches all folders in usr/lib to find // /usr/lib/*/lib/tools.jar for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (path.endsWith("*")) { path = path.substring(0, path.length() - 1); File dir = new File(path); if (dir.isDirectory()) { File[] subdirs = dir.listFiles(); for (int x = 0; x < subdirs.length; x++) { String search = subdirs[x].getAbsolutePath(); if (this.pathMatches(search)) { items.add(search); } } } } else { if (this.pathMatches(path)) { items.add(path); } } } // Make the enties in the vector unique items = new Vector(new HashSet(items)); // Now clear the combobox and add the items out of the newly // generated vector this.pathComboBox.removeAllItems(); VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables()); for (int i = 0; i < items.size(); i++) { this.pathComboBox.addItem(vs.substitute((String) items.get(i), "plain")); } // loop through all items for (int i = 0; i < this.pathComboBox.getItemCount(); ++i) { String path = (String) this.pathComboBox.getItemAt(i); if (this.pathMatches(path)) { this.pathComboBox.setSelectedIndex(i); return true; } } // if the user entered something else, it's not listed as an item if (this.pathMatches((String) this.pathComboBox.getSelectedItem())) { return true; } }
| 3,239,986 |
public UserInputPanel(InstallerFrame parent, InstallData installData) { super(parent, installData); instanceNumber = instanceCount++; this.parentFrame = parent; // ---------------------------------------------------- // ---------------------------------------------------- layout = new TwoColumnLayout(10, 5, 30, 25, TwoColumnLayout.LEFT); setLayout(layout); // ---------------------------------------------------- // get a locale database // ---------------------------------------------------- try { // this.langpack = parent.langpack; String resource = LANG_FILE_NAME + "_" + idata.localeISO3; this.langpack = new LocaleDatabase(ResourceManager.getInstance().getInputStream( resource)); } catch (Throwable exception) {} // ---------------------------------------------------- // read the specifications // ---------------------------------------------------- try { readSpec(); } catch (Throwable exception) { // log the problem exception.printStackTrace(); } if (!haveSpec) { // return if we could not read the spec. further // processing will only lead to problems. In this // case we must skip the panel when it gets activated. return; } // ---------------------------------------------------- // process all field nodes. Each field node is analyzed // for its type, then an appropriate memeber function // is called that will create the correct UI elements. // ---------------------------------------------------- Vector fields = spec.getChildrenNamed(FIELD_NODE_ID); for (int i = 0; i < fields.size(); i++) { XMLElement field = (XMLElement) fields.elementAt(i); String attribute = field.getAttribute(TYPE); if (attribute != null) { if (attribute.equals(RULE_FIELD)) { addRuleField(field); } else if (attribute.equals(TEXT_FIELD)) { addTextField(field); } else if (attribute.equals(COMBO_FIELD)) { addComboBox(field); } else if (attribute.equals(RADIO_FIELD)) { addRadioButton(field); } else if (attribute.equals(PWD_FIELD)) { addPasswordField(field); } else if (attribute.equals(SPACE_FIELD)) { addSpace(field); } else if (attribute.equals(DIVIDER_FIELD)) { addDivider(field); } else if (attribute.equals(CHECK_FIELD)) { addCheckBox(field); } else if (attribute.equals(STATIC_TEXT)) { addText(field); } else if (attribute.equals(TITLE_FIELD)) { addTitle(field); } else if (attribute.equals(SEARCH_FIELD)) { addSearch(field); } } } }
|
public UserInputPanel(InstallerFrame parent, InstallData installData) { super(parent, installData); instanceNumber = instanceCount++; this.parentFrame = parent; // ---------------------------------------------------- // ---------------------------------------------------- TwoColumnLayout layout = new TwoColumnLayout(10, 5, 30, 25, TwoColumnLayout.LEFT); setLayout(layout); // ---------------------------------------------------- // get a locale database // ---------------------------------------------------- try { // this.langpack = parent.langpack; String resource = LANG_FILE_NAME + "_" + idata.localeISO3; this.langpack = new LocaleDatabase(ResourceManager.getInstance().getInputStream( resource)); } catch (Throwable exception) {} // ---------------------------------------------------- // read the specifications // ---------------------------------------------------- try { readSpec(); } catch (Throwable exception) { // log the problem exception.printStackTrace(); } if (!haveSpec) { // return if we could not read the spec. further // processing will only lead to problems. In this // case we must skip the panel when it gets activated. return; } // ---------------------------------------------------- // process all field nodes. Each field node is analyzed // for its type, then an appropriate memeber function // is called that will create the correct UI elements. // ---------------------------------------------------- Vector fields = spec.getChildrenNamed(FIELD_NODE_ID); for (int i = 0; i < fields.size(); i++) { XMLElement field = (XMLElement) fields.elementAt(i); String attribute = field.getAttribute(TYPE); if (attribute != null) { if (attribute.equals(RULE_FIELD)) { addRuleField(field); } else if (attribute.equals(TEXT_FIELD)) { addTextField(field); } else if (attribute.equals(COMBO_FIELD)) { addComboBox(field); } else if (attribute.equals(RADIO_FIELD)) { addRadioButton(field); } else if (attribute.equals(PWD_FIELD)) { addPasswordField(field); } else if (attribute.equals(SPACE_FIELD)) { addSpace(field); } else if (attribute.equals(DIVIDER_FIELD)) { addDivider(field); } else if (attribute.equals(CHECK_FIELD)) { addCheckBox(field); } else if (attribute.equals(STATIC_TEXT)) { addText(field); } else if (attribute.equals(TITLE_FIELD)) { addTitle(field); } else if (attribute.equals(SEARCH_FIELD)) { addSearch(field); } } } }
| 3,239,987 |
private void addTitle(XMLElement spec) { String title = getText(spec); boolean italic = getBoolean(spec, ITALICS, false); boolean bold = getBoolean(spec, BOLD, false); float multiplier = getFloat(spec, SIZE, 2.0f); int justify = getAlignment(spec); if (title != null) { JLabel label = new JLabel(title); Font font = label.getFont(); float size = font.getSize(); int style = 0; if (bold) { style = style + Font.BOLD; } if (italic) { style = style + Font.ITALIC; } font = font.deriveFont(style, (size * multiplier)); label.setFont(font); label.setAlignmentX(0); TwoColumnConstraints constraints = new TwoColumnConstraints(); constraints.align = justify; constraints.position = TwoColumnConstraints.NORTH; add(label, constraints); } }
|
private void addTitle(XMLElement spec) { String title = getText(spec); boolean italic = getBoolean(spec, ITALICS, false); boolean bold = getBoolean(spec, BOLD, false); float multiplier = getFloat(spec, SIZE, 2.0f); int justify = getAlignment(spec); if (title != null) { JLabel label = new JLabel(title); Font font = label.getFont(); float size = font.getSize(); int style = 0; if (bold) { style += Font.BOLD; } if (italic) { style = style + Font.ITALIC; } font = font.deriveFont(style, (size * multiplier)); label.setFont(font); label.setAlignmentX(0); TwoColumnConstraints constraints = new TwoColumnConstraints(); constraints.align = justify; constraints.position = TwoColumnConstraints.NORTH; add(label, constraints); } }
| 3,239,988 |
private void addTitle(XMLElement spec) { String title = getText(spec); boolean italic = getBoolean(spec, ITALICS, false); boolean bold = getBoolean(spec, BOLD, false); float multiplier = getFloat(spec, SIZE, 2.0f); int justify = getAlignment(spec); if (title != null) { JLabel label = new JLabel(title); Font font = label.getFont(); float size = font.getSize(); int style = 0; if (bold) { style = style + Font.BOLD; } if (italic) { style = style + Font.ITALIC; } font = font.deriveFont(style, (size * multiplier)); label.setFont(font); label.setAlignmentX(0); TwoColumnConstraints constraints = new TwoColumnConstraints(); constraints.align = justify; constraints.position = TwoColumnConstraints.NORTH; add(label, constraints); } }
|
private void addTitle(XMLElement spec) { String title = getText(spec); boolean italic = getBoolean(spec, ITALICS, false); boolean bold = getBoolean(spec, BOLD, false); float multiplier = getFloat(spec, SIZE, 2.0f); int justify = getAlignment(spec); if (title != null) { JLabel label = new JLabel(title); Font font = label.getFont(); float size = font.getSize(); int style = 0; if (bold) { style = style + Font.BOLD; } if (italic) { style += Font.ITALIC; } font = font.deriveFont(style, (size * multiplier)); label.setFont(font); label.setAlignmentX(0); TwoColumnConstraints constraints = new TwoColumnConstraints(); constraints.align = justify; constraints.position = TwoColumnConstraints.NORTH; add(label, constraints); } }
| 3,239,989 |
private void buildUI() { Object[] uiElement; for (int i = 0; i < uiElements.size(); i++) { uiElement = (Object[]) uiElements.elementAt(i); if (itemRequiredFor((Vector) uiElement[POS_PACKS]) && itemRequiredForOs((Vector) uiElement[POS_OS])) { try { if (uiElement[POS_DISPLAYED] == null || uiElement[POS_DISPLAYED].toString().equals("false")) { add((JComponent) uiElement[POS_FIELD], uiElement[POS_CONSTRAINTS]); } uiElement[POS_DISPLAYED] = Boolean.valueOf(true); uiElements.remove(i); uiElements.add(i, uiElement); } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } } else { try { if (uiElement[POS_DISPLAYED] != null && uiElement[POS_DISPLAYED].toString().equals("true")) { remove((JComponent) uiElement[POS_FIELD]); } } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } uiElement[POS_DISPLAYED] = Boolean.valueOf(false); uiElements.remove(i); uiElements.add(i, uiElement); } } }
|
private void buildUI() { Object[] uiElement; for (int i = 0; i < uiElements.size(); i++) { uiElement = (Object[]) uiElements.elementAt(i); if (itemRequiredFor((Vector) uiElement[POS_PACKS]) && itemRequiredForOs((Vector) uiElement[POS_OS])) { try { if (uiElement[POS_DISPLAYED] == null || "false".equals(uiElement[POS_DISPLAYED].toString())) { add((JComponent) uiElement[POS_FIELD], uiElement[POS_CONSTRAINTS]); } uiElement[POS_DISPLAYED] = Boolean.valueOf(true); uiElements.remove(i); uiElements.add(i, uiElement); } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } } else { try { if (uiElement[POS_DISPLAYED] != null && uiElement[POS_DISPLAYED].toString().equals("true")) { remove((JComponent) uiElement[POS_FIELD]); } } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } uiElement[POS_DISPLAYED] = Boolean.valueOf(false); uiElements.remove(i); uiElements.add(i, uiElement); } } }
| 3,239,990 |
private void buildUI() { Object[] uiElement; for (int i = 0; i < uiElements.size(); i++) { uiElement = (Object[]) uiElements.elementAt(i); if (itemRequiredFor((Vector) uiElement[POS_PACKS]) && itemRequiredForOs((Vector) uiElement[POS_OS])) { try { if (uiElement[POS_DISPLAYED] == null || uiElement[POS_DISPLAYED].toString().equals("false")) { add((JComponent) uiElement[POS_FIELD], uiElement[POS_CONSTRAINTS]); } uiElement[POS_DISPLAYED] = Boolean.valueOf(true); uiElements.remove(i); uiElements.add(i, uiElement); } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } } else { try { if (uiElement[POS_DISPLAYED] != null && uiElement[POS_DISPLAYED].toString().equals("true")) { remove((JComponent) uiElement[POS_FIELD]); } } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } uiElement[POS_DISPLAYED] = Boolean.valueOf(false); uiElements.remove(i); uiElements.add(i, uiElement); } } }
|
private void buildUI() { Object[] uiElement; for (int i = 0; i < uiElements.size(); i++) { uiElement = (Object[]) uiElements.elementAt(i); if (itemRequiredFor((Vector) uiElement[POS_PACKS]) && itemRequiredForOs((Vector) uiElement[POS_OS])) { try { if (uiElement[POS_DISPLAYED] == null || uiElement[POS_DISPLAYED].toString().equals("false")) { add((JComponent) uiElement[POS_FIELD], uiElement[POS_CONSTRAINTS]); } uiElement[POS_DISPLAYED] = Boolean.valueOf(true); uiElements.remove(i); uiElements.add(i, uiElement); } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } } else { try { if (uiElement[POS_DISPLAYED] != null && "true".equals(uiElement[POS_DISPLAYED].toString())) { remove((JComponent) uiElement[POS_FIELD]); } } catch (Throwable exception) { System.out.println("Internal format error in field: " + uiElement[POS_TYPE].toString()); // !!! logging } uiElement[POS_DISPLAYED] = Boolean.valueOf(false); uiElements.remove(i); uiElements.add(i, uiElement); } } }
| 3,239,991 |
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if (family.equals("windows")) { match = OsVersion.IS_WINDOWS; } else if (family.equals("mac")) { match = OsVersion.IS_OSX; } else if (family.equals("unix")) { match = OsVersion.IS_UNIX; } return match; } return false; }
|
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if ("windows".equals(family)) { match = OsVersion.IS_WINDOWS; } else if (family.equals("mac")) { match = OsVersion.IS_OSX; } else if (family.equals("unix")) { match = OsVersion.IS_UNIX; } return match; } return false; }
| 3,239,992 |
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if (family.equals("windows")) { match = OsVersion.IS_WINDOWS; } else if (family.equals("mac")) { match = OsVersion.IS_OSX; } else if (family.equals("unix")) { match = OsVersion.IS_UNIX; } return match; } return false; }
|
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if (family.equals("windows")) { match = OsVersion.IS_WINDOWS; } else if ("mac".equals(family)) { match = OsVersion.IS_OSX; } else if (family.equals("unix")) { match = OsVersion.IS_UNIX; } return match; } return false; }
| 3,239,993 |
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if (family.equals("windows")) { match = OsVersion.IS_WINDOWS; } else if (family.equals("mac")) { match = OsVersion.IS_OSX; } else if (family.equals("unix")) { match = OsVersion.IS_UNIX; } return match; } return false; }
|
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if (family.equals("windows")) { match = OsVersion.IS_WINDOWS; } else if (family.equals("mac")) { match = OsVersion.IS_OSX; } else if ("unix".equals(family)) { match = OsVersion.IS_UNIX; } return match; } return false; }
| 3,239,994 |
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if (family.equals("windows")) { match = OsVersion.IS_WINDOWS; } else if (family.equals("mac")) { match = OsVersion.IS_OSX; } else if (family.equals("unix")) { match = OsVersion.IS_UNIX; } return match; } return false; }
|
public boolean itemRequiredForOs(Vector os) { if (os.size() == 0) { return true; } for (int i = 0; i < os.size(); i++) { String family = ((XMLElement) os.elementAt(i)).getAttribute(FAMILY); boolean match = false; if (family.equals("windows")) { match = OsVersion.IS_WINDOWS; } else if (family.equals("mac")) { match = OsVersion.IS_OSX; } else if (family.equals("unix")) { match = OsVersion.IS_UNIX; } if (match) { return true; } } return false; }
| 3,239,995 |
private boolean readRuleField(Object[] field) { RuleInputField ruleField = null; String variable = null; try { ruleField = (RuleInputField) field[POS_FIELD]; variable = (String) field[POS_VARIABLE]; } catch (Throwable exception) { return (true); } if ((variable == null) || (ruleField == null)) { return (true); } boolean success = ruleField.validateContents(); if (!success) { String message = ""; try { message = langpack.getString((String) field[POS_MESSAGE]); if (message.equals("")) { message = (String) field[POS_MESSAGE]; } } catch (Throwable t) { message = (String) field[POS_MESSAGE]; } JOptionPane.showMessageDialog(parentFrame, message, parentFrame.langpack .getString("UserInputPanel.error.caption"), JOptionPane.WARNING_MESSAGE); return (false); } idata.setVariable(variable, ruleField.getText()); entries.add(new TextValuePair(variable, ruleField.getText())); return (true); }
|
private boolean readRuleField(Object[] field) { RuleInputField ruleField = null; String variable = null; try { ruleField = (RuleInputField) field[POS_FIELD]; variable = (String) field[POS_VARIABLE]; } catch (Throwable exception) { return (true); } if ((variable == null) || (ruleField == null)) { return (true); } boolean success = ruleField.validateContents(); if (!success) { String message = ""; try { message = langpack.getString((String) field[POS_MESSAGE]); if ("".equals(message)) { message = (String) field[POS_MESSAGE]; } } catch (Throwable t) { message = (String) field[POS_MESSAGE]; } JOptionPane.showMessageDialog(parentFrame, message, parentFrame.langpack .getString("UserInputPanel.error.caption"), JOptionPane.WARNING_MESSAGE); return (false); } idata.setVariable(variable, ruleField.getText()); entries.add(new TextValuePair(variable, ruleField.getText())); return (true); }
| 3,239,996 |
public UserInputPanelAutomationHelper(Map entries) { this.entries = entries; }
|
public UserInputPanelAutomationHelper () { this.entries = entries; }
| 3,239,997 |
public UserInputPanelAutomationHelper(Map entries) { this.entries = entries; }
|
public UserInputPanelAutomationHelper(Map entries) { this.entries = null; }
| 3,239,998 |
public void emitError (String title, String message) { JOptionPane.showMessageDialog(this, message, title, JOptionPane.ERROR_MESSAGE); }
|
public void emitError(String title, String message) { JOptionPane.showMessageDialog(this, message, title, JOptionPane.ERROR_MESSAGE); }
| 3,239,999 |
public void emitError (String title, String message) { JOptionPane.showMessageDialog(this, message, title, JOptionPane.ERROR_MESSAGE); }
|
public void emitError (String title, String message) { JOptionPane.showMessageDialog( this, message, title, JOptionPane.ERROR_MESSAGE); }
| 3,240,000 |
public synchronized void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { success = false; } } boolean shouldDestroy = !success; _numActive--; if(success) { _pool.add(new SoftReference(obj)); } notifyAll(); // _numActive has changed if(shouldDestroy) { try { _factory.destroyObject(obj); } catch(Exception e) { // ignored } } }
|
public synchronized void returnObject(Object obj) throws Exception { assertOpen(); boolean success = true; if(!(_factory.validateObject(obj))) { success = false; } else { try { _factory.passivateObject(obj); } catch(Exception e) { success = false; } } boolean shouldDestroy = !success; _numActive--; if(success) { _pool.add(new SoftReference(obj, refQueue)); } notifyAll(); // _numActive has changed if(shouldDestroy) { try { _factory.destroyObject(obj); } catch(Exception e) { // ignored } } }
| 3,240,004 |
public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); }
|
public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); }
| 3,240,006 |
public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); }
|
public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); }
| 3,240,007 |
public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); }
|
public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source == prevButton) { if ((installdata.curPanelNumber > 0)) { installdata.curPanelNumber--; switchPanel(installdata.curPanelNumber + 1); } } else if (source == nextButton) { if ((installdata.curPanelNumber < installdata.panels.size() - 1) && ((IzPanel) installdata.panels.get(installdata.curPanelNumber)).isValidated()) { installdata.curPanelNumber++; switchPanel(installdata.curPanelNumber - 1); } } else if (source == quitButton) exit(); }
| 3,240,008 |
public void windowClosing(WindowEvent e) { // We show an alert anyway if (!installdata.canClose) JOptionPane.showMessageDialog(null, langpack.getString("installer.quit.message"), langpack.getString("installer.warning"), JOptionPane.ERROR_MESSAGE); wipeAborted(); Housekeeper.getInstance().shutDown(0); }
|
public void windowClosing(WindowEvent e) { // We show an alert anyway if (!installdata.canClose) JOptionPane.showMessageDialog( null, langpack.getString("installer.quit.message"), langpack.getString("installer.warning"), JOptionPane.ERROR_MESSAGE); wipeAborted(); Housekeeper.getInstance().shutDown(0); }
| 3,240,009 |
public InstallerFrame(String title, InstallData installdata) throws Exception { super(title); this.installdata = installdata; this.langpack = installdata.langpack; // Sets the window events handler addWindowListener(new WindowHandler()); // Builds the GUI loadIcons(); loadPanels(); buildGUI(); // We show the frame showFrame(); switchPanel(0); }
|
public InstallerFrame(String title, InstallData installdata) throws Exception { super(title); this.installdata = installdata; this.langpack = installdata.langpack; // Sets the window events handler addWindowListener(new WindowHandler()); // Builds the GUI loadIcons(); loadPanels(); buildGUI(); // We show the frame showFrame(); switchPanel(0); }
| 3,240,010 |
public void buildConstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, double wx, double wy) { gbc.gridx = gx; gbc.gridy = gy; gbc.gridwidth = gw; gbc.gridheight = gh; gbc.weightx = wx; gbc.weighty = wy; }
|
public void buildConstraints(GridBagConstraints gbc, int gx, int gy, int gw, int gh, double wx, double wy) { gbc.gridx = gx; gbc.gridy = gy; gbc.gridwidth = gw; gbc.gridheight = gh; gbc.weightx = wx; gbc.weighty = wy; }
| 3,240,011 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,012 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,013 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,014 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer, BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,015 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder( BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(8, 8, 8, 8), BorderFactory.createTitledBorder( new EtchedLineBorder(), langpack.getString("installer.madewith") + " "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,016 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,017 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,018 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
privatevoidbuildGUI(){//SetstheframeiconsetIconImage(icons.getImageIcon("JFrameIcon").getImage());//PreparestheglasspanetoblocktheguiinteractionwhenneededJPanelglassPane=(JPanel)getGlassPane();glassPane.addMouseListener(newMouseAdapter(){});glassPane.addMouseMotionListener(newMouseMotionAdapter(){});glassPane.addKeyListener(newKeyAdapter(){});//Wesetthelayout&preparetheconstraintobjectcontentPane=(JPanel)getContentPane();contentPane.setLayout(newBorderLayout());//layout);//WeaddthepanelscontainerpanelsContainer=newJPanel();panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10));panelsContainer.setLayout(newGridLayout(1,1));contentPane.add(panelsContainer,BorderLayout.CENTER);//Weputthefirstpanelinstalldata.curPanelNumber=0;IzPanelpanel_0=(IzPanel)installdata.panels.get(0);panelsContainer.add(panel_0);//Weaddthenavigationbuttons&labelsNavigationHandlernavHandler=newNavigationHandler();JPanelnavPanel=newJPanel();navPanel.setLayout(newBoxLayout(navPanel,BoxLayout.X_AXIS));navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8),BorderFactory.createTitledBorder(newEtchedLineBorder(),langpack.getString("installer.madewith")+"")));navPanel.add(Box.createHorizontalGlue());prevButton=ButtonFactory.createButton(langpack.getString("installer.prev"),icons.getImageIcon("stepback"),installdata.buttonsHColor);navPanel.add(prevButton);prevButton.addActionListener(navHandler);navPanel.add(Box.createRigidArea(newDimension(5,0)));nextButton=ButtonFactory.createButton(langpack.getString("installer.next"),icons.getImageIcon("stepforward"),installdata.buttonsHColor);navPanel.add(nextButton);nextButton.addActionListener(navHandler);navPanel.add(Box.createRigidArea(newDimension(5,0)));quitButton=ButtonFactory.createButton(langpack.getString("installer.quit"),icons.getImageIcon("stop"),installdata.buttonsHColor);navPanel.add(quitButton);quitButton.addActionListener(navHandler);contentPane.add(navPanel,BorderLayout.SOUTH);try{ResourceManagerrm=ResourceManager.getInstance();ImageIconicon=rm.getImageIconResource("Installer.image");if(icon!=null){JPanelimgPanel=newJPanel();imgPanel.setLayout(newBorderLayout());imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0));JLabellabel=newJLabel(icon);label.setBorder(BorderFactory.createLoweredBevelBorder());imgPanel.add(label,BorderLayout.CENTER);contentPane.add(imgPanel,BorderLayout.WEST);}}catch(Exceptione){//ignore}getRootPane().setDefaultButton(nextButton);}
| 3,240,019 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,020 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel, BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,021 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,022 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,023 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,024 |
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
|
private void buildGUI() { // Sets the frame icon setIconImage(icons.getImageIcon("JFrameIcon").getImage()); // Prepares the glass pane to block the gui interaction when needed JPanel glassPane = (JPanel) getGlassPane(); glassPane.addMouseListener( new MouseAdapter() { }); glassPane.addMouseMotionListener( new MouseMotionAdapter() { }); glassPane.addKeyListener( new KeyAdapter() { }); // We set the layout & prepare the constraint object contentPane = (JPanel) getContentPane(); contentPane.setLayout(new BorderLayout());//layout); // We add the panels container panelsContainer = new JPanel(); panelsContainer.setBorder(BorderFactory.createEmptyBorder(10,10,0,10)); panelsContainer.setLayout(new GridLayout(1, 1)); contentPane.add(panelsContainer,BorderLayout.CENTER); // We put the first panel installdata.curPanelNumber = 0; IzPanel panel_0 = (IzPanel) installdata.panels.get(0); panelsContainer.add(panel_0); // We add the navigation buttons & labels NavigationHandler navHandler = new NavigationHandler(); JPanel navPanel = new JPanel(); navPanel.setLayout(new BoxLayout(navPanel, BoxLayout.X_AXIS)); navPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(8,8,8,8), BorderFactory.createTitledBorder(new EtchedLineBorder(), langpack.getString("installer.madewith")+" "))); navPanel.add(Box.createHorizontalGlue()); prevButton = ButtonFactory.createButton(langpack.getString("installer.prev"), icons.getImageIcon("stepback"), installdata.buttonsHColor); navPanel.add(prevButton); prevButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); nextButton = ButtonFactory.createButton(langpack.getString("installer.next"), icons.getImageIcon("stepforward"), installdata.buttonsHColor); navPanel.add(nextButton); nextButton.addActionListener(navHandler); navPanel.add(Box.createRigidArea(new Dimension(5, 0))); quitButton = ButtonFactory.createButton(langpack.getString("installer.quit"), icons.getImageIcon("stop"), installdata.buttonsHColor); navPanel.add(quitButton); quitButton.addActionListener(navHandler); contentPane.add(navPanel,BorderLayout.SOUTH); try { ResourceManager rm = ResourceManager.getInstance(); ImageIcon icon = rm.getImageIconResource("Installer.image"); if (icon != null) { JPanel imgPanel = new JPanel(); imgPanel.setLayout(new BorderLayout()); imgPanel.setBorder(BorderFactory.createEmptyBorder(10,10,0,0)); JLabel label = new JLabel(icon); label.setBorder(BorderFactory.createLoweredBevelBorder()); imgPanel.add(label,BorderLayout.CENTER); contentPane.add(imgPanel,BorderLayout.WEST); } } catch (Exception e) { //ignore } getRootPane().setDefaultButton(nextButton); }
| 3,240,025 |
public void centerFrame(Window frame) { Dimension frameSize = frame.getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); }
|
public void centerFrame(Window frame) { Dimension frameSize = frame.getSize(); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); frame.setLocation( (screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2 - 10); }
| 3,240,026 |
public void exit() { if (installdata.canClose) { // Everything went well if (installdata.info.getWriteUninstaller()) writeUninstallData(); Housekeeper.getInstance().shutDown(0); } else { // The installation is not over int res = JOptionPane.showConfirmDialog(this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); if (res == JOptionPane.YES_OPTION) { wipeAborted(); Housekeeper.getInstance().shutDown(0); } } }
|
public void exit() { if (installdata.canClose) { // Everything went well if (installdata.info.getWriteUninstaller()) writeUninstallData(); Housekeeper.getInstance().shutDown(0); } else { // The installation is not over int res = JOptionPane.showConfirmDialog(this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); if (res == JOptionPane.YES_OPTION) { wipeAborted(); Housekeeper.getInstance().shutDown(0); } } }
| 3,240,027 |
public void exit() { if (installdata.canClose) { // Everything went well if (installdata.info.getWriteUninstaller()) writeUninstallData(); Housekeeper.getInstance().shutDown(0); } else { // The installation is not over int res = JOptionPane.showConfirmDialog(this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); if (res == JOptionPane.YES_OPTION) { wipeAborted(); Housekeeper.getInstance().shutDown(0); } } }
|
public void exit() { if (installdata.canClose) { // Everything went well if (installdata.info.getWriteUninstaller()) writeUninstallData(); Housekeeper.getInstance().shutDown(0); } else { // The installation is not over int res = JOptionPane.showConfirmDialog(this, langpack.getString("installer.quit.message"), langpack.getString("installer.quit.title"), JOptionPane.YES_NO_OPTION); if (res == JOptionPane.YES_OPTION) { wipeAborted(); Housekeeper.getInstance().shutDown(0); } } }
| 3,240,028 |
public InputStream getResource(String res) { try { //System.out.println ("retrieving resource " + res); return ResourceManager.getInstance().getInputStream (res); } catch (ResourceNotFoundException e) { return null; } }
|
public InputStream getResource(String res) { try { //System.out.println ("retrieving resource " + res); return ResourceManager.getInstance().getInputStream (res); } catch (ResourceNotFoundException e) { return null; } }
| 3,240,029 |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } }
|
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } }
| 3,240,030 |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } }
|
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } }
| 3,240,031 |
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } }
|
private void loadIcons() throws Exception { // Initialisations icons = new IconsDatabase(); URL url; ImageIcon img; XMLElement icon; InputStream inXML = getClass().getResourceAsStream("/com/izforge/izpack/installer/icons.xml"); // Initialises the parser StdXMLParser parser = new StdXMLParser(); parser.setBuilder(new StdXMLBuilder()); parser.setReader(new StdXMLReader(inXML)); parser.setValidator(new NonValidator()); // We get the data XMLElement data = (XMLElement) parser.parse(); // We load the icons Vector children = data.getChildrenNamed("icon"); int size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); icons.put(icon.getAttribute("id"), img); } // We load the Swing-specific icons children = data.getChildrenNamed("sysicon"); size = children.size(); for (int i = 0; i < size; i++) { icon = (XMLElement) children.get(i); url = getClass().getResource(icon.getAttribute("res")); img = new ImageIcon(url); UIManager.put(icon.getAttribute("id"), img); } }
| 3,240,032 |
private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } }
|
private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } }
| 3,240,033 |
private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } }
|
private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } }
| 3,240,034 |
private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } }
|
private void loadPanels() throws Exception { // Initialisation java.util.List panelsOrder = installdata.panelsOrder; int i; int size = panelsOrder.size(); String className; Class objectClass; Constructor constructor; Object object; IzPanel panel; Class[] paramsClasses = new Class[2]; paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame"); paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData"); Object[] params = {this, installdata}; // We load each of them for (i = 0; i < size; i++) { // We add the panel Panel p = (Panel)panelsOrder.get(i); if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints)) continue; className = (String)p.className; objectClass = Class.forName("com.izforge.izpack.panels." + className); constructor = objectClass.getDeclaredConstructor(paramsClasses); object = constructor.newInstance(params); panel = (IzPanel) object; installdata.panels.add(panel); // We add the XML data panel root XMLElement panelRoot = new XMLElement(className); installdata.xmlData.addChild(panelRoot); } }
| 3,240,035 |
protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); }
|
protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); }
| 3,240,036 |
protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); }
|
protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); }
| 3,240,037 |
protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); }
|
protected void switchPanel(int last) { panelsContainer.setVisible(false); IzPanel panel = (IzPanel) installdata.panels.get(installdata.curPanelNumber); IzPanel l_panel = (IzPanel) installdata.panels.get(last); l_panel.makeXMLData(installdata.xmlData.getChildAtIndex(last)); panelsContainer.remove(l_panel); panelsContainer.add(panel); if (installdata.curPanelNumber == 0) { prevButton.setVisible(false); lockPrevButton(); unlockNextButton();// if we push the button back at the license panel } else if (installdata.curPanelNumber == installdata.panels.size() - 1) { prevButton.setVisible(false); nextButton.setVisible(false); lockNextButton(); } else { prevButton.setVisible(true); nextButton.setVisible(true); unlockPrevButton(); unlockNextButton(); } l_panel.panelDeactivate(); panel.panelActivate(); panelsContainer.setVisible(true); }
| 3,240,038 |
protected void wipeAborted() { Iterator it; // We check for running unpackers ArrayList unpackers = Unpacker.getRunningInstances(); it = unpackers.iterator(); while (it.hasNext()) { Thread t = (Thread) it.next(); t.interrupt(); // The unpacker process might keep writing stuffs so we wait :-/ try { Thread.sleep(3000, 0); } catch (Exception e) {} } // Wipes them all in 2 stages UninstallData u = UninstallData.getInstance(); it = u.getFilesList().iterator(); if (!it.hasNext()) return; while (it.hasNext()) { String p = (String) it.next(); File f = new File(p); f.delete(); } cleanWipe(new File(installdata.getInstallPath())); }
|
protected void wipeAborted() { Iterator it; // We check for running unpackers ArrayList unpackers = Unpacker.getRunningInstances(); it = unpackers.iterator(); while (it.hasNext()) { Thread t = (Thread) it.next(); t.interrupt(); // The unpacker process might keep writing stuffs so we wait :-/ try { Thread.sleep(3000, 0); } catch (Exception e) {} } // Wipes them all in 2 stages UninstallData u = UninstallData.getInstance(); it = u.getFilesList().iterator(); if (!it.hasNext()) return; while (it.hasNext()) { String p = (String) it.next(); File f = new File(p); f.delete(); } cleanWipe(new File(installdata.getInstallPath())); }
| 3,240,039 |
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
|
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
| 3,240,040 |
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
|
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
| 3,240,041 |
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
|
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile) iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
| 3,240,042 |
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
|
private void writeUninstallData() { try { // We get the data UninstallData udata = UninstallData.getInstance(); List files = udata.getFilesList(); ZipOutputStream outJar = installdata.uninstallOutJar; if (outJar == null) return; // We write the files log outJar.putNextEntry(new ZipEntry("install.log")); BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(installdata.getInstallPath()); logWriter.newLine(); Iterator iter = files.iterator(); while (iter.hasNext()) { logWriter.write((String) iter.next()); if (iter.hasNext()) logWriter.newLine(); } logWriter.flush(); outJar.closeEntry(); // We write the uninstaller jar file log outJar.putNextEntry(new ZipEntry("jarlocation.log")); logWriter = new BufferedWriter(new OutputStreamWriter(outJar)); logWriter.write(udata.getUninstallerJarFilename()); logWriter.newLine(); logWriter.write(udata.getUninstallerPath()); logWriter.flush(); outJar.closeEntry(); // Write out executables to execute on uninstall outJar.putNextEntry(new ZipEntry("executables")); ObjectOutputStream execStream = new ObjectOutputStream(outJar); iter = udata.getExecutablesList().iterator(); execStream.writeInt(udata.getExecutablesList().size()); while (iter.hasNext()) { ExecutableFile file = (ExecutableFile)iter.next(); execStream.writeObject(file); } execStream.flush(); outJar.closeEntry(); // Cleanup outJar.flush(); outJar.close(); } catch (Exception err) { err.printStackTrace(); } }
| 3,240,043 |
public void panelActivate() { // get compilers again (because they might contain variables from former // panels) Iterator it = this.worker.getAvailableCompilers().iterator(); compilerComboBox.removeAllItems(); while (it.hasNext()) compilerComboBox.addItem((String) it.next()); // We clip the panel Dimension dim = parent.getPanelsContainerSize(); dim.width = dim.width - (dim.width / 4); dim.height = 150; setMinimumSize(dim); setMaximumSize(dim); setPreferredSize(dim); parent.lockNextButton(); }
|
public void panelActivate() { // get compilers again (because they might contain variables from former // panels) Iterator it = this.worker.getAvailableCompilers().iterator(); compilerComboBox.removeAllItems(); while (it.hasNext()) compilerComboBox.addItem((String) it.next()); // We clip the panel Dimension dim = parent.getPanelsContainerSize(); dim.width -= (dim.width / 4); dim.height = 150; setMinimumSize(dim); setMaximumSize(dim); setPreferredSize(dim); parent.lockNextButton(); }
| 3,240,044 |
public void run() { CursorableLinkedList.Cursor objcursor = null; CursorableLinkedList.Cursor keycursor = null; Object key = null; while(!_cancelled) { long sleeptime = 0L; synchronized(GenericKeyedObjectPool.this) { sleeptime = _timeBetweenEvictionRunsMillis; } try { Thread.currentThread().sleep(sleeptime); } catch(Exception e) { ; // ignored } try { synchronized(GenericKeyedObjectPool.this) { for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // if we don't have a key cursor, then create one, and close any object cursor if(null == keycursor) { keycursor = _poolList.cursor(); key = null; if(null != objcursor) { objcursor.close(); objcursor = null; } } // if we don't have an object cursor if(null == objcursor) { // if the keycursor has a next value, then use it if(keycursor.hasNext()) { key = keycursor.next(); CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); objcursor = pool.cursor(pool.size()); } else { // else close the key cursor and loop back around if(null != keycursor) { keycursor.close(); keycursor = _poolList.cursor(); if(null != objcursor) { objcursor.close(); objcursor = null; } } continue; } } // if the objcursor has a previous object, then test it if(objcursor.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objcursor.previous()); if(System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { try { objcursor.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // if that was the last object for that key, drop that pool if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } catch(Exception e) { ; // ignored } } else if(_testWhileIdle) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { objcursor.remove(); try { _factory.passivateObject(key,pair.value); } catch(Exception ex) { ; // ignored } _factory.destroyObject(key,pair.value); } if(active) { if(!_factory.validateObject(key,pair.value)) { try { objcursor.remove(); _totalIdle--; try { _factory.passivateObject(key,pair.value); } catch(Exception e) { ; // ignored } _factory.destroyObject(key,pair.value); if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } catch(Exception e) { ; // ignored } } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { objcursor.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } } } } } else { // else the objcursor is done, so close it and loop around if(objcursor != null) { objcursor.close(); objcursor = null; } } } } } } catch(Exception e) { ; // ignored } } if(null != keycursor) { keycursor.close(); } if(null != objcursor) { objcursor.close(); } }
|
public void run() { CursorableLinkedList.Cursor objcursor = null; CursorableLinkedList.Cursor keycursor = null; Object key = null; while(!_cancelled) { long sleeptime = 0L; synchronized(GenericKeyedObjectPool.this) { sleeptime = _timeBetweenEvictionRunsMillis; } try { Thread.currentThread().sleep(sleeptime); } catch(Exception e) { ; // ignored } try { synchronized(GenericKeyedObjectPool.this) { for(int i=0,m=getNumTests();i<m;i++) { if(_poolMap.size() > 0) { // if we don't have a key cursor, then create one, and close any object cursor if(null == keycursor) { keycursor = _poolList.cursor(); key = null; if(null != objcursor) { objcursor.close(); objcursor = null; } } // if we don't have an object cursor if(null == objcursor) { // if the keycursor has a next value, then use it if(keycursor.hasNext()) { key = keycursor.next(); CursorableLinkedList pool = (CursorableLinkedList)(_poolMap.get(key)); objcursor = pool.cursor(pool.size()); } else { // else close the key cursor and loop back around if(null != keycursor) { keycursor.close(); keycursor = _poolList.cursor(); if(null != objcursor) { objcursor.close(); objcursor = null; } } continue; } } // if the objcursor has a previous object, then test it if(objcursor.hasPrevious()) { ObjectTimestampPair pair = (ObjectTimestampPair)(objcursor.previous()); if(_minEvictableIdleTimeMillis > 0 && System.currentTimeMillis() - pair.tstamp > _minEvictableIdleTimeMillis) { try { objcursor.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); // if that was the last object for that key, drop that pool if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } catch(Exception e) { ; // ignored } } else if(_testWhileIdle) { boolean active = false; try { _factory.activateObject(key,pair.value); active = true; } catch(Exception e) { objcursor.remove(); try { _factory.passivateObject(key,pair.value); } catch(Exception ex) { ; // ignored } _factory.destroyObject(key,pair.value); } if(active) { if(!_factory.validateObject(key,pair.value)) { try { objcursor.remove(); _totalIdle--; try { _factory.passivateObject(key,pair.value); } catch(Exception e) { ; // ignored } _factory.destroyObject(key,pair.value); if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } catch(Exception e) { ; // ignored } } else { try { _factory.passivateObject(key,pair.value); } catch(Exception e) { objcursor.remove(); _totalIdle--; _factory.destroyObject(key,pair.value); if( ((CursorableLinkedList)(_poolMap.get(key))).isEmpty() ) { _poolMap.remove(key); _poolList.remove(key); } } } } } } else { // else the objcursor is done, so close it and loop around if(objcursor != null) { objcursor.close(); objcursor = null; } } } } } } catch(Exception e) { ; // ignored } } if(null != keycursor) { keycursor.close(); } if(null != objcursor) { objcursor.close(); } }
| 3,240,046 |
private void doSudoCmd() { String pass = passwordField.getText(); File file = null; try { // write file in /tmp file = new File("/tmp/cmd_sudo.sh");// ""c:/temp/run.bat"" FileOutputStream fos = new FileOutputStream(file); fos.write("echo $password | sudo -S ls\nexit $?".getBytes()); // "echo // $password // > // pipo.txt" fos.close(); // execute HashMap vars = new HashMap(); vars.put("password", pass); List oses = new ArrayList(); oses.add(new OsConstraint("unix", null, null, null)); ArrayList plist = new ArrayList(); ParsableFile pf = new ParsableFile(file.getAbsolutePath(), null, null, oses); plist.add(pf); ScriptParser sp = new ScriptParser(plist, new VariableSubstitutor(vars)); sp.parseFiles(); ArrayList elist = new ArrayList(); ExecutableFile ef = new ExecutableFile(file.getAbsolutePath(), ExecutableFile.POSTINSTALL, ExecutableFile.ABORT, oses, false); elist.add(ef); FileExecutor fe = new FileExecutor(elist); int retval = fe.executeFiles(ExecutableFile.POSTINSTALL, this); if (retval == 0) { idata.setVariable("password", pass); isValid = true; } // else is already showing dialog // { // JOptionPane.showMessageDialog(this, "Cannot execute 'sudo' cmd, // check your password", "Error", JOptionPane.ERROR_MESSAGE); // } } catch (Exception e) { // JOptionPane.showMessageDialog(this, "Cannot execute 'sudo' cmd, // check your password", "Error", JOptionPane.ERROR_MESSAGE); e.printStackTrace(); isValid = false; } try { if (file != null && file.exists()) file.delete();// you don't // want the file // with password // tobe arround, // in case of // error } catch (Exception e) { // ignore } }
|
private void doSudoCmd() { String pass = passwordField.getText(); File file = null; try { // write file in /tmp file = new File("/tmp/cmd_sudo.sh");// ""c:/temp/run.bat"" FileOutputStream fos = new FileOutputStream(file); fos.write("echo $password | sudo -S ls\nexit $?".getBytes()); // "echo // $password // > // pipo.txt" fos.close(); // execute Properties vars = new Properties(); vars.put("password", pass); List oses = new ArrayList(); oses.add(new OsConstraint("unix", null, null, null)); ArrayList plist = new ArrayList(); ParsableFile pf = new ParsableFile(file.getAbsolutePath(), null, null, oses); plist.add(pf); ScriptParser sp = new ScriptParser(plist, new VariableSubstitutor(vars)); sp.parseFiles(); ArrayList elist = new ArrayList(); ExecutableFile ef = new ExecutableFile(file.getAbsolutePath(), ExecutableFile.POSTINSTALL, ExecutableFile.ABORT, oses, false); elist.add(ef); FileExecutor fe = new FileExecutor(elist); int retval = fe.executeFiles(ExecutableFile.POSTINSTALL, this); if (retval == 0) { idata.setVariable("password", pass); isValid = true; } // else is already showing dialog // { // JOptionPane.showMessageDialog(this, "Cannot execute 'sudo' cmd, // check your password", "Error", JOptionPane.ERROR_MESSAGE); // } } catch (Exception e) { // JOptionPane.showMessageDialog(this, "Cannot execute 'sudo' cmd, // check your password", "Error", JOptionPane.ERROR_MESSAGE); e.printStackTrace(); isValid = false; } try { if (file != null && file.exists()) file.delete();// you don't // want the file // with password // tobe arround, // in case of // error } catch (Exception e) { // ignore } }
| 3,240,047 |
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
|
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
| 3,240,048 |
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
|
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
| 3,240,049 |
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
|
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
| 3,240,050 |
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
|
if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } protectedif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } booleanif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } buildHeadline(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Stringif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } imageIconName,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } intif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceNumberif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } booleanif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } resultif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } false;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } //if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } TODO:if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } protecedif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instancenumberif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } //if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } TODO:if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } isif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } toif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } beif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } validatedif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } //if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } TODO:if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } //if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } TODO:if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } firstif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Testif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } ifif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } aif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Resourceif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } forif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } yourif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } protectedif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Instanceif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } exists.if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Stringif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headline;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Stringif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineSearchBaseKeyif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } myClassnameif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } dif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } "headline";if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceNumberif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } >if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } -1if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Stringif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceSearchKeyif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineSearchBaseKeyif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } dif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Integer.toString(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceNumberif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Stringif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceHeadlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } getString(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceSearchKeyif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } //System.out.println(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } "foundif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headline:if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } "if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceHeadlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } dif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Sif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } +if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } ":if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } "+if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceNumberif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } !if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceSearchKey.equals(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceHeadlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } instanceHeadline;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } elseif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } getString(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineSearchBaseKeyif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } elseif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } getString(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineSearchBaseKeyif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } !=if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } nullif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } (if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } imageIconNameif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } !=if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } nullif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } &&if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } !if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } "".equals(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } imageIconNameif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headLineLabelif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } newif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } JLabel(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headline,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } getImageIcon(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } imageIconNameif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } ),if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } JLabel.TRAILINGif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } elseif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } {if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headLineLabelif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } newif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } JLabel(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headlineif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Fontif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } fontif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headLineLabel.getFont(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } floatif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } sizeif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } font.getSize(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } intif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } styleif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 0;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } fontif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } font.deriveFont(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } style,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } (if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } sizeif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } *if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 1.5fif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } )if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headLineLabel.setFont(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } fontif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } GridBagConstraintsif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } gbcif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } getNewGridBagConstraints(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } X_ORIGIN,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Y_ORIGIN,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } COLS_1,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } ROWS_1if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } gbc.weightxif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 0.0;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } gbc.weightyif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 1.0;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } gbc.fillif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } GridBagConstraints.NONE;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } gbc.anchorif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } GridBagConstraints.NORTHWEST;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } gbc.insetsif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } =if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } newif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } Insets(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 0,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 0,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 5,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } 0if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } izPanelLayout.setConstraints(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headLineLabel,if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } gbcif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headLineLabel.setName(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } HEADLINEif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } add(if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } headLineLabelif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } );if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } returnif( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } result;if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } if( Debug.isLOG() ) { System.out.println( "found headline: " + instanceHeadline + d + " for instance # " + instanceNumber ); } }
| 3,240,051 |
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
|
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.LEADING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
| 3,240,052 |
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
|
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
| 3,240,053 |
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); headLineLabel.setName( HEADLINE ); add( headLineLabel ); } return result; }
|
protected boolean buildHeadline( String imageIconName, int instanceNumber ) { boolean result = false; // TODO: proteced instancenumber // TODO: is to be validated // TODO: // TODO: first Test if a Resource for your protected Instance exists. String headline; String headlineSearchBaseKey = myClassname + d + "headline"; if( instanceNumber > -1 ) { String instanceSearchKey = headlineSearchBaseKey + d + Integer.toString( instanceNumber ); String instanceHeadline = getString( instanceSearchKey ); //System.out.println( "found headline: " + instanceHeadline + d + S + ": "+ instanceNumber ); if( ! instanceSearchKey.equals( instanceHeadline ) ) { headline = instanceHeadline; } else { headline = getString( headlineSearchBaseKey ); } } else { headline = getString( headlineSearchBaseKey ); } if( headline != null ) { if( ( imageIconName != null ) && ! "".equals( imageIconName ) ) { headLineLabel = new JLabel( headline, getImageIcon( imageIconName ), JLabel.TRAILING ); } else { headLineLabel = new JLabel( headline ); } Font font = headLineLabel.getFont( ); float size = font.getSize( ); int style = 0; font = font.deriveFont( style, ( size * 1.5f ) ); headLineLabel.setFont( font ); GridBagConstraints gbc = getNewGridBagConstraints( X_ORIGIN, Y_ORIGIN, COLS_1, ROWS_1 ); gbc.weightx = 0.0; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.NORTHWEST; gbc.insets = new Insets( 0, 0, 5, 0 ); izPanelLayout.setConstraints( headLineLabel, gbc ); add( headLineLabel ); } return result; }
| 3,240,054 |
protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); panel.className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + panel.className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); }
|
protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); String className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + panel.className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); }
| 3,240,055 |
protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); panel.className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + panel.className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); }
|
protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); panel.className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); }
| 3,240,056 |
protected void addPanels(XMLElement data) throws CompilerException { notifyCompilerListener("addPanels", CompilerListener.BEGIN, data); XMLElement root = requireChildNamed(data, "panels"); // at least one panel is required Vector panels = root.getChildrenNamed("panel"); if (panels.isEmpty()) parseError(root, "<panels> requires a <panel>"); // We process each panel markup Iterator iter = panels.iterator(); while (iter.hasNext()) { XMLElement xmlPanel = (XMLElement) iter.next(); // create the serialized Panel data Panel panel = new Panel(); panel.osConstraints = OsConstraint.getOsList(xmlPanel); panel.className = xmlPanel.getAttribute("classname"); // Panel files come in jars packaged w/ IzPack String jarPath = "bin/panels/" + panel.className + ".jar"; URL url = findIzPackResource(jarPath, "Panel jar file", xmlPanel); // insert into the packager packager.addPanelJar(panel, url); } notifyCompilerListener("addPanels", CompilerListener.END, data); }
|
String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; protectedString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; voidString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; addPanels(XMLElementString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; data)String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; throwsString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; CompilerExceptionString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; {String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; notifyCompilerListener("addPanels",String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; CompilerListener.BEGIN,String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; data);String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; XMLElementString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; rootString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; requireChildNamed(data,String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; "panels");String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; //String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; atString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; leastString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; oneString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; isString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; requiredString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; VectorString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panelsString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; root.getChildrenNamed("panel");String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; ifString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; (panels.isEmpty())String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; parseError(root,String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; "<panels>String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; requiresString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; aString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; <panel>");String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; //String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; WeString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; processString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; eachString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; markupString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; IteratorString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; iterString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panels.iterator();String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; whileString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; (iter.hasNext())String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; {String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; XMLElementString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; xmlPanelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; (XMLElement)String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; iter.next();String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; //String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; createString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; theString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; serializedString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; PanelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; dataString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; PanelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; newString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; Panel();String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panel.osConstraintsString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; OsConstraint.getOsList(xmlPanel);String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panel.classNameString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; xmlPanel.getAttribute("classname");String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; //String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; PanelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; filesString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; comeString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; inString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; jarsString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; packagedString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; w/String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; IzPackString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; StringString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; jarPathString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; "bin/panels/"String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; +String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; panel.classNameString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; +String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; ".jar";String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; URLString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; urlString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; =String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; findIzPackResource(jarPath,String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; "PanelString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; jarString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; file",String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; xmlPanel);String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; //String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; insertString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; intoString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; theString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; packagerString fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; packager.addPanelJar(panel,String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; url);String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; }String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; notifyCompilerListener("addPanels",String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; CompilerListener.END,String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; data);String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; String fullClassName = null; try { fullClassName = getFullClassName(url, className); } catch (Exception e) { ; } if( fullClassName != null) panel.className = fullClassName; else panel.className = className; }
| 3,240,057 |
private String getFullClassName(URL url, String className) throws Exception { JarInputStream jis = new JarInputStream(url.openStream()); ZipEntry zentry = null; String fullName = null; while ( (zentry = jis.getNextEntry()) != null) { String name = zentry.getName(); int lastPos = name.lastIndexOf(".class"); if( lastPos < 0 ) { continue; // No class file. } name = name.replace('/', '.'); int pos = -1; if( className != null ) { pos = name.indexOf(className); } if( pos > 0 ) // "Main" class found return(name.substring(0, lastPos)); } jis.close(); return( null ); }
|
private String getFullClassName(URL url, String className) throws Exception { JarInputStream jis = new JarInputStream(url.openStream()); ZipEntry zentry = null; String fullName = null; while ( (zentry = jis.getNextEntry()) != null) { String name = zentry.getName(); int lastPos = name.lastIndexOf(".class"); if( lastPos < 0 ) { continue; // No class file. } name = name.replace('/', '.'); int pos = -1; if( className != null ) { pos = name.indexOf(className); } if( name.length() == pos + className.length() + 6 ) { jis.close(); // "Main" class found return(name.substring(0, lastPos)); } jis.close(); return( null ); }
| 3,240,058 |
private void buildGUI(IconManager im) { getContentPane().setLayout(new BorderLayout(0, 0)); TitlePanel tp = new TitlePanel("Import Image", "Import new images in an existing dataset.", NOTE, im.getIcon(IconManager.IMPORT_IMAGE_BIG)); getContentPane().add(tp, BorderLayout.NORTH); getContentPane().add(chooser, BorderLayout.CENTER); getContentPane().add(selection, BorderLayout.SOUTH); }
|
private void buildGUI(IconManager im) { getContentPane().setLayout(new BorderLayout(0, 0)); TitlePanel tp = new TitlePanel("Import Image", "Import new images in an existing dataset.", NOTE, im.getIcon(IconManager.IMPORT_IMAGE_BIG)); getContentPane().add(tp, BorderLayout.NORTH); getContentPane().add(chooser, BorderLayout.CENTER); getContentPane().add(selection, BorderLayout.SOUTH); }
| 3,240,060 |
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
|
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
| 3,240,061 |
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
|
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
| 3,240,062 |
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
|
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel( " - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel( " - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
| 3,240,063 |
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
|
public HelloPanel(InstallerFrame parent, InstallData idata) { super(parent, idata); // The 'super' layout GridBagLayout superLayout = new GridBagLayout(); setLayout(superLayout); GridBagConstraints gbConstraints = new GridBagConstraints(); gbConstraints.insets = new Insets(0, 0, 0, 0); gbConstraints.fill = GridBagConstraints.NONE; gbConstraints.anchor = GridBagConstraints.CENTER; // We initialize our 'real' layout JPanel centerPanel = new JPanel(); layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.setLayout(layout); superLayout.addLayoutComponent(centerPanel, gbConstraints); add(centerPanel); // We create and put the labels String str; centerPanel.add(Box.createVerticalStrut(10)); str = parent.langpack.getString("HelloPanel.welcome1") + idata.info.getAppName() + " " + idata.info.getAppVersion() + parent.langpack.getString("HelloPanel.welcome2"); welcomeLabel = new JLabel(str, parent.icons.getImageIcon("host"), JLabel.TRAILING); centerPanel.add(welcomeLabel); centerPanel.add(Box.createVerticalStrut(20)); ArrayList authors = idata.info.getAuthors(); int size = authors.size(); if (size > 0) { str = parent.langpack.getString("HelloPanel.authors"); appAuthorsLabel = new JLabel(str, parent.icons.getImageIcon("information"), JLabel.TRAILING); centerPanel.add(appAuthorsLabel); JLabel label; for (int i = 0; i < size; i++) { Info.Author a = (Info.Author) authors.get(i); String email = (a.getEmail() != null) ? (" <" + a.getEmail() + ">") : ""; label = new JLabel(" - " + a.getName() + email, parent.icons.getImageIcon("empty"), JLabel.TRAILING); centerPanel.add(label); } centerPanel.add(Box.createVerticalStrut(20)); } if (idata.info.getAppURL() != null) { str = parent.langpack.getString("HelloPanel.url") + idata.info.getAppURL(); appURLLabel = new JLabel(str, parent.icons.getImageIcon("bookmark"), JLabel.TRAILING); centerPanel.add(appURLLabel); } }
| 3,240,064 |
public Object getValue(String key, String value) throws NativeLibException { return (null); }
|
public Object getValue(String key, String value, Object defaultVal) throws NativeLibException { return (null); }
| 3,240,065 |
public void emitNotification (String message) { // ignore it }
|
public void emitNotification(String message) { // ignore it }
| 3,240,066 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.