本文整理汇总了Java中edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer类的典型用法代码示例。如果您正苦于以下问题:Java EdgeLabelRenderer类的具体用法?Java EdgeLabelRenderer怎么用?Java EdgeLabelRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EdgeLabelRenderer类属于edu.uci.ics.jung.visualization.renderers包,在下文中一共展示了EdgeLabelRenderer类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
public Component prepareRenderer(RenderContext<V, E> rc, EdgeLabelRenderer graphLabelRenderer, Object value,
boolean isSelected, E edge) {
return rc.getEdgeLabelRenderer().<E> getEdgeLabelRendererComponent(rc.getScreenDevice(), value,
rc.getEdgeFontTransformer().transform(edge), isSelected, edge);
}
示例2: prepareRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
@Override
public Component prepareRenderer(RenderContext<V, E> rc, EdgeLabelRenderer graphLabelRenderer, Object value, boolean isSelected, E edge) {
Component component = super.prepareRenderer(rc, graphLabelRenderer, value, isSelected, edge);
component.setForeground(transformer.transform(edge));
return component;
}
示例3: getEdgeLabelRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
public final EdgeLabelRenderer getEdgeLabelRenderer() {
return new EdgeLabelRenderer() {
@Override
public boolean isRotateEdgeLabels() {
return true;
}
@Override
public void setRotateEdgeLabels(final boolean state) {
}
@Override
public <T> Component getEdgeLabelRendererComponent(final JComponent vv, final Object value, final Font font,
final boolean isSelected, final T edge) {
final String labelText;
final String iconPath;
if (edge instanceof JobGraphLink) {
final JobGraphLink link = (JobGraphLink) edge;
if (link.getOutputDataStream() != null) {
labelText = link.getLinkLabel();
iconPath = IconUtils.OUTPUT_DATA_STREAM_PATH;
} else if (isCompoundRequirementLink(link)) {
final HasFilterOutcomes from = (HasFilterOutcomes) link.getFrom();
final CompoundComponentRequirement req = (CompoundComponentRequirement) link.getRequirement();
final Set<FilterOutcome> outcomesFrom = req.getOutcomesFrom(from);
labelText = new CompoundComponentRequirement(outcomesFrom).getSimpleName();
iconPath = IconUtils.FILTER_OUTCOME_PATH;
} else {
labelText = link.getLinkLabel();
iconPath = IconUtils.FILTER_OUTCOME_PATH;
}
} else {
labelText = value + "";
iconPath = IconUtils.FILTER_OUTCOME_PATH;
}
final Icon icon = imageManager.getImageIcon(iconPath, IconUtils.ICON_SIZE_SMALL);
final JLabel label = new JLabel(labelText, icon, JLabel.LEFT);
label.setFont(_normalFont);
return label;
}
};
}
示例4: getEdgeLabelRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
/**
* @see edu.uci.ics.jung.visualization.RenderContext#getEdgeLabelRenderer()
*/
public EdgeLabelRenderer getEdgeLabelRenderer() {
return edgeLabelRenderer;
}
示例5: setEdgeLabelRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
/**
* @see edu.uci.ics.jung.visualization.RenderContext#setEdgeLabelRenderer(edu.uci.ics.jung.visualization.EdgeLabelRenderer)
*/
public void setEdgeLabelRenderer(EdgeLabelRenderer edgeLabelRenderer) {
this.edgeLabelRenderer = edgeLabelRenderer;
}
示例6: prepareRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
public Component prepareRenderer(RenderContext<V, E> rc, EdgeLabelRenderer graphLabelRenderer, Object value, boolean isSelected, E edge) {
return rc.getEdgeLabelRenderer().<E> getEdgeLabelRendererComponent(rc.getScreenDevice(), value, rc.getEdgeFontTransformer().transform(edge), isSelected, edge);
}
示例7: getEdgeLabelRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
EdgeLabelRenderer getEdgeLabelRenderer();
示例8: setEdgeLabelRenderer
import edu.uci.ics.jung.visualization.renderers.EdgeLabelRenderer; //导入依赖的package包/类
void setEdgeLabelRenderer(EdgeLabelRenderer edgeLabelRenderer);