WikiVis Web Application
 All Classes Namespaces Files Functions Variables Pages
Package Functions | Package Attributes | Static Package Attributes | List of all members
WikiVis Class Reference

Processing class - this class handles all visulization related actions. More...

Package Functions

void setup ()
 initializes the visualization
void draw ()
 (re-)draws the visualization
void setMinNodeLabelInvolvThreshhold (double thresh)
 sets the minimum node label threshold
void setMaxNodeLabelInvolvThreshhold (double thresh)
 sets the maximum node label threshold
void setMinEdgeWeightThreshhold (double thresh)
 sets the minimum edge weight threshold
void setMaxEdgeWeightThreshhold (double thresh)
 sets the maximum edge weight threshold
int getNetworkWidth ()
 returns the network width (+padding)
int getNetworkHeight ()
 returns the network height (+padding)
int getNetworkPadding ()
 returns the network padding
int getLoadingDataState ()
 returns the LOADING_DATA state
int getNoDataState ()
 returns the NO_DATA state
int getDataLoadedState ()
 returns the DATA_LOADED state
boolean isInRange (double min, double max, double value)
 determines if a value lies between two values
double findMaxWeight (ArrayList< Edge > edges)
 finds the maximum weight of the given edges
double findMinWeight (ArrayList< Edge > edges)
 finds the minimum weight of the given edges
void clearData ()
 clears all data of the visualization
void setState (int state)
 sets the state of the visualization
int quickSelectPartition (ArrayList< Sortable > list, int left, int right, int pivotIndex)
 partition part of the quickselect algorithm
EdgePair quickSelect (ArrayList< Sortable > list, int left, int right, int k)
 performs the quickselect algorithm (pulls the first k elements at the beginning of the list)
void swapElements (ArrayList< Sortable > list, int pos1, int pos2)
 swaps two elements in a list
void recalculateVisibleEdgePairs ()
 reorders the list of EdgePairs that the EdgePairs with the highest weights are at the beginning
void recalculateVisibleNodeLabels ()
 reorders the list of Nodes that the Nodes with the highest involvements are at the beginning
void addNode (String author, double posX, double posY, double involvement, double variance)
 adds a new Node to draw, does nothing if a node node with the same name already exists
void addEdge (String fromName, String toName, String weight)
 adds a new Edge to draw, the referenced Node must be created before, or no edge will be created
void addDateBox (int month, int year, int amount)
 adds a new date Box with statistical data
void addSelectionBox (int startMonth, int startYear, int endMonth, int endYear)
 sets the time range

Package Attributes

ArrayList< Nodenodes = new ArrayList<Node>()
 the list of nodes to draw (first maxNodeLabels nodes have the highest involvements)
HashMap< String, NodenodeMap = new HashMap<String, Node>()
 a map of all node with the names as keys
ArrayList< Edgeedges = new ArrayList<Edge>()
 the list of all edges
ArrayList< EdgePairedgePairs = new ArrayList<EdgePair>()
 a list of all EdgePairs (first maxEdgePairs have the highest total weights)
HashMap< String, EdgePairedgePairMap = new HashMap<String, EdgePair>()
 a map of all EdgePairs with their concatenated author names as keys
PlotManager manager = new PlotManager()
 the plot manager that draws the statistics box plot
double maxWeight
 the current maximum edge weight
double minWeight
 the current minimum edge weight
double maxInvolvement
 the current maximum Involvement
int state = STATE_NO_DATA
 the current state
Legend legend = new Legend()
 the legend instance used to draw the legend
double minNodeLabelInvolvThreshhold = 0
 the min involvement threshhold used to determine label visibility
double maxNodeLabelInvolvThreshhold = -1
 the max involvement threshhold used to determine label visibility
double minEdgeWeightThreshhold = 0
 the min edge weight threshhold used to determine edge visibility
double maxEdgeWeightThreshhold = -1
 the min edge weight threshhold used to determine edge visibility
int maxEdgePairs = 10
 the maximum EdgePairs that should be drawn
int maxNodeLabels = 10
 the maximum number of Nodes that should be drawn with label
boolean forceRedraw = true
 indicates that the whole visualization should be redrawn

Static Package Attributes

static final int NETWORK_WIDTH = 650
 the network width, incl.
static final int NETWORK_HEIGHT = 650
 the network height, incl.
static final int NETWORK_PADDING_X = 80
 the network padding in x direction reserved for label drawing
static final int NETWORK_PADDING_Y = 80
 the network padding in y direction reserved for label drawing
static final int LEGEND_WIDTH = 250
 the legend width
static final int LEGEND_HEIGHT = NETWORK_HEIGHT * 0.75
 the legend height
static final int LEGEND_POS_X = 0
 the legend x position
static final int LEGEND_POS_Y = 0
 the legend y position
static final int NETWORK_POS_X = LEGEND_WIDTH
 the Network x position
static final int NETWORK_POS_Y = 0
 the network y position
static final int BOX_POS_X = 0
 the statistics box plot x position
static final int BOX_WIDTH = NETWORK_WIDTH + LEGEND_WIDTH
 the statistics box plot width
static final int BOX_HEIGHT = NETWORK_HEIGHT / 3
 the statistics box plot height
static final int BOX_POS_Y = NETWORK_HEIGHT
 the statistics box plot x position
static final int TOTAL_WIDTH = NETWORK_WIDTH + LEGEND_WIDTH
 the total visualization width
static final int TOTAL_HEIGHT = NETWORK_HEIGHT + BOX_HEIGHT
 the total visaulization height
static final int STATE_NO_DATA = 1
 the NO_DATA state value
static final int STATE_LOADING_DATA = 2
 the LOADING_DATA state value
static final int STATE_DATA_LOADED = 3
 the DATA_LOADED state value

Detailed Description

Processing class - this class handles all visulization related actions.

Author
Manuel Wyss e0106.nosp@m.157@.nosp@m.stude.nosp@m.nt.t.nosp@m.uwien.nosp@m..ac..nosp@m.at
Florian Zoubek zoube.nosp@m.k@bi.nosp@m.tanda.nosp@m.rt.a.nosp@m.t

Member Function Documentation

void WikiVis.addDateBox ( int  month,
int  year,
int  amount 
)
package

adds a new date Box with statistical data

Parameters
monththe month
yearthe year
amountthe amount of revsions in the specified month
void WikiVis.addEdge ( String  fromName,
String  toName,
String  weight 
)
package

adds a new Edge to draw, the referenced Node must be created before, or no edge will be created

Parameters
fromNamethe author name of the start node
toNamethe author name of the end node
weightthe weight of the edge
void WikiVis.addNode ( String  author,
double  posX,
double  posY,
double  involvement,
double  variance 
)
package

adds a new Node to draw, does nothing if a node node with the same name already exists

Parameters
authorthe author name
posXthe x position
posYthe y position
involvementthe involvement of the node
variancethe variance of the node
void WikiVis.addSelectionBox ( int  startMonth,
int  startYear,
int  endMonth,
int  endYear 
)
package

sets the time range

Parameters
startMonththe month value of the first month
startYearthe year value of the first month
endMonththe month value of the last month
endYearthe year value of the last month
void WikiVis.clearData ( )
package

clears all data of the visualization

void WikiVis.draw ( )
package

(re-)draws the visualization

double WikiVis.findMaxWeight ( ArrayList< Edge edges)
package

finds the maximum weight of the given edges

Parameters
edgesthe edges
Returns
the maximum weight
double WikiVis.findMinWeight ( ArrayList< Edge edges)
package

finds the minimum weight of the given edges

Parameters
edgesthe edges
Returns
the minimum weight
int WikiVis.getDataLoadedState ( )
package

returns the DATA_LOADED state

Returns
the DATA_LOADED state
int WikiVis.getLoadingDataState ( )
package

returns the LOADING_DATA state

Returns
the LOADING_DATA state
int WikiVis.getNetworkHeight ( )
package

returns the network height (+padding)

Returns
the network height
int WikiVis.getNetworkPadding ( )
package

returns the network padding

Returns
the network padding
int WikiVis.getNetworkWidth ( )
package

returns the network width (+padding)

Returns
the network width
int WikiVis.getNoDataState ( )
package

returns the NO_DATA state

Returns
the NO_DATA state
boolean WikiVis.isInRange ( double  min,
double  max,
double  value 
)
package

determines if a value lies between two values

Parameters
minthe minimum value
maxthe maximum value or negative if unbounded
valuethe value to test
Returns
true if the value lies between the given values, false otherwise
EdgePair WikiVis.quickSelect ( ArrayList< Sortable list,
int  left,
int  right,
int  k 
)
package

performs the quickselect algorithm (pulls the first k elements at the beginning of the list)

Parameters
listthe list to perform upon
leftthe first index of the sublist
rightthe last index of the sublist
kthe lnumber of elements to put at the beginning
Returns
the k-th EdgePair
int WikiVis.quickSelectPartition ( ArrayList< Sortable list,
int  left,
int  right,
int  pivotIndex 
)
package

partition part of the quickselect algorithm

Parameters
listthe list to partition
leftthe first index of the sublist
rightthe last index of the sublist
pivotIndexthe pivot index
Returns
the new pivot index
void WikiVis.recalculateVisibleEdgePairs ( )
package

reorders the list of EdgePairs that the EdgePairs with the highest weights are at the beginning

void WikiVis.recalculateVisibleNodeLabels ( )
package

reorders the list of Nodes that the Nodes with the highest involvements are at the beginning

void WikiVis.setMaxEdgeWeightThreshhold ( double  thresh)
package

sets the maximum edge weight threshold

Parameters
threshthe threshold
void WikiVis.setMaxNodeLabelInvolvThreshhold ( double  thresh)
package

sets the maximum node label threshold

Deprecated:
has no influence any more
Parameters
threshthe threshold
void WikiVis.setMinEdgeWeightThreshhold ( double  thresh)
package

sets the minimum edge weight threshold

Parameters
threshthe threshold
void WikiVis.setMinNodeLabelInvolvThreshhold ( double  thresh)
package

sets the minimum node label threshold

Deprecated:
has no influence any more
Parameters
threshthe threshold
void WikiVis.setState ( int  state)
package

sets the state of the visualization

void WikiVis.setup ( )
package

initializes the visualization

void WikiVis.swapElements ( ArrayList< Sortable list,
int  pos1,
int  pos2 
)
package

swaps two elements in a list

Parameters
listthe list to perform upon
pos1the first index
pos2the last index

Member Data Documentation

final int WikiVis.BOX_HEIGHT = NETWORK_HEIGHT / 3
staticpackage

the statistics box plot height

final int WikiVis.BOX_POS_X = 0
staticpackage

the statistics box plot x position

final int WikiVis.BOX_POS_Y = NETWORK_HEIGHT
staticpackage

the statistics box plot x position

final int WikiVis.BOX_WIDTH = NETWORK_WIDTH + LEGEND_WIDTH
staticpackage

the statistics box plot width

HashMap<String, EdgePair> WikiVis.edgePairMap = new HashMap<String, EdgePair>()
package

a map of all EdgePairs with their concatenated author names as keys

ArrayList<EdgePair> WikiVis.edgePairs = new ArrayList<EdgePair>()
package

a list of all EdgePairs (first maxEdgePairs have the highest total weights)

ArrayList<Edge> WikiVis.edges = new ArrayList<Edge>()
package

the list of all edges

boolean WikiVis.forceRedraw = true
package

indicates that the whole visualization should be redrawn

Legend WikiVis.legend = new Legend()
package

the legend instance used to draw the legend

final int WikiVis.LEGEND_HEIGHT = NETWORK_HEIGHT * 0.75
staticpackage

the legend height

final int WikiVis.LEGEND_POS_X = 0
staticpackage

the legend x position

final int WikiVis.LEGEND_POS_Y = 0
staticpackage

the legend y position

final int WikiVis.LEGEND_WIDTH = 250
staticpackage

the legend width

PlotManager WikiVis.manager = new PlotManager()
package

the plot manager that draws the statistics box plot

int WikiVis.maxEdgePairs = 10
package

the maximum EdgePairs that should be drawn

double WikiVis.maxEdgeWeightThreshhold = -1
package

the min edge weight threshhold used to determine edge visibility

double WikiVis.maxInvolvement
package

the current maximum Involvement

double WikiVis.maxNodeLabelInvolvThreshhold = -1
package

the max involvement threshhold used to determine label visibility

Deprecated:
has no influence any more
int WikiVis.maxNodeLabels = 10
package

the maximum number of Nodes that should be drawn with label

double WikiVis.maxWeight
package

the current maximum edge weight

double WikiVis.minEdgeWeightThreshhold = 0
package

the min edge weight threshhold used to determine edge visibility

double WikiVis.minNodeLabelInvolvThreshhold = 0
package

the min involvement threshhold used to determine label visibility

Deprecated:
has no influence any more
double WikiVis.minWeight
package

the current minimum edge weight

final int WikiVis.NETWORK_HEIGHT = 650
staticpackage

the network height, incl.

NETWORK_PADDING_Y

final int WikiVis.NETWORK_PADDING_X = 80
staticpackage

the network padding in x direction reserved for label drawing

final int WikiVis.NETWORK_PADDING_Y = 80
staticpackage

the network padding in y direction reserved for label drawing

final int WikiVis.NETWORK_POS_X = LEGEND_WIDTH
staticpackage

the Network x position

final int WikiVis.NETWORK_POS_Y = 0
staticpackage

the network y position

final int WikiVis.NETWORK_WIDTH = 650
staticpackage

the network width, incl.

NETWORK_PADDING_X

HashMap<String, Node> WikiVis.nodeMap = new HashMap<String, Node>()
package

a map of all node with the names as keys

ArrayList<Node> WikiVis.nodes = new ArrayList<Node>()
package

the list of nodes to draw (first maxNodeLabels nodes have the highest involvements)

int WikiVis.state = STATE_NO_DATA
package

the current state

final int WikiVis.STATE_DATA_LOADED = 3
staticpackage

the DATA_LOADED state value

final int WikiVis.STATE_LOADING_DATA = 2
staticpackage

the LOADING_DATA state value

final int WikiVis.STATE_NO_DATA = 1
staticpackage

the NO_DATA state value

final int WikiVis.TOTAL_HEIGHT = NETWORK_HEIGHT + BOX_HEIGHT
staticpackage

the total visaulization height

final int WikiVis.TOTAL_WIDTH = NETWORK_WIDTH + LEGEND_WIDTH
staticpackage

the total visualization width


The documentation for this class was generated from the following file: