use of com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLabelContent in project binnavi by google.
the class CEditNodeHelper method setCaretEnd.
public static void setCaretEnd(final AbstractZyGraph<?, ?> graph, final Node node, final MouseEvent event) {
final double mouseX = graph.getEditMode().translateX(event.getX());
final double mouseY = graph.getEditMode().translateY(event.getY());
final IZyNodeRealizer realizer = (IZyNodeRealizer) graph.getGraph().getRealizer(node);
final ZyLabelContent labelContent = realizer.getNodeContent();
final CDefaultLabelEventHandler labelEventHandler = graph.getEditMode().getLabelEventHandler();
if (labelContent.isSelectable()) {
final double zoom = graph.getView().getZoom();
final double nodeX = realizer.getRealizer().getX();
final double nodeY = realizer.getRealizer().getY();
labelEventHandler.handleMouseReleasedEvent(nodeX, nodeY, mouseX, mouseY, zoom, event.getClickCount());
}
}
use of com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLabelContent in project binnavi by google.
the class ZyFunctionNodeBuilder method buildContent.
/**
* Creates the node content of a function node.
*
* @param node The node which provides the raw data.
* @param graphSettings Graph settings used to build the graph.
* @param modifier Calculates the address strings. This argument can be null.
*
* @return The generated node content of the function node.
*/
public static ZyLabelContent buildContent(final INaviFunctionNode node, final ZyGraphViewSettings graphSettings, final INodeModifier modifier) {
Preconditions.checkNotNull(node, "IE01556: Argument node can't be null");
final ZyLabelContent content = new ZyLabelContent(null);
buildContent(content, node, graphSettings, modifier);
return content;
}
use of com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLabelContent in project binnavi by google.
the class ZyGroupNodeBuilder method buildContent.
/**
* Builds the content of a single group node.
*
* @param node The group node that provides the underlying data.
*
* @return The created content.
*/
public static ZyLabelContent buildContent(final INaviGroupNode node) {
Preconditions.checkNotNull(node, "IE01558: Node argument can not be null");
final ZyLabelContent content = new ZyLabelContent(null);
buildContent(content, node);
return content;
}
use of com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLabelContent in project binnavi by google.
the class GraphSearcher method clearResults.
/**
* Clears the results list.
*/
public void clearResults() {
for (final SearchResult result : m_results) {
if (result.getObject() instanceof NaviNode) {
((NaviNode) result.getObject()).setBackgroundColor(result.getLine(), result.getPosition(), result.getLength(), null);
} else if (result.getObject() instanceof NaviEdge) {
final NaviEdge edge = (NaviEdge) result.getObject();
final ZyLabelContent content = edge.getLabelContent();
content.getLineContent(result.getLine()).setBackgroundColor(result.getPosition(), result.getLength(), null);
}
}
m_results.clear();
m_cursor.clear();
m_changed = false;
}
use of com.google.security.zynamics.zylib.gui.zygraph.realizers.ZyLabelContent in project binnavi by google.
the class ZyEdgeBuilder method buildContent.
/**
* Builds the content of a graph edge label.
*
* @param edge The edge whose label content is built.
*
* @return The created edge label content.
*/
public static ZyLabelContent buildContent(final INaviEdge edge) {
final ZyLabelContent content = new ZyLabelContent(null);
ZyNodeBuilder.addCommentLines(content, edge, edge.getLocalComment(), edge.getGlobalComment());
return content;
}
Aggregations