|
Á¦ ¸ñ |
[RE]Layout¿¡ °üÇÏ¿© |
|
ÀÛ¼ºÀÚ |
¹æÈ¿µ¿ |
ÀÛ¼ºÀÏ |
2004-03-05 |
Á¶È¸¼ö |
1284 ȸ |
|
÷ºÎÆÄÀÏ |
÷ºÎµÈ ÆÄÀϾøÀ½.
|
|
IlvCircularLayoutÀ» ÀÌ¿ëÇÑ ¿¹Á¦ÀÔ´Ï´Ù. Âü°íÇϽðí¿ä. IlvGraphicÀ» »ç¿ëÇÏÁö ¾Ê¾Æµµ µÇ°í ¾Ë¶÷Ç¥½Ã¿Í °ü°è¾ø½À´Ï´Ù.
public void setNodeLayout(boolean flag) { final IlpNetworkView view = getNetwork().getView(); final IltCompositeGrapher grapher = view.getCompositeGrapher();
if(view != null) // no use layout return;
System.out.println("Circular Layout starting ......."); if (nodeLayout == null) nodeLayout = new IlvCircularLayout(); nodeLayout.setLinkStyle(IlvCircularLayout.NO_RESHAPE_STYLE); //nodeLayout.setLinkStyle(IlvCircularLayout.STRAIGHT_LINE_STYLE); nodeLayout.setLevelOffset(50); if (flag) nodeLayout.setOffset(30); else nodeLayout.setOffset(50);
nodeLayout.attach(grapher.getGraphModel()); nodeLayout.setCoordinatesMode(IlvGraphLayout.VIEW_COORDINATES); nodeLayout.setLayoutRegion(new ilog.views.IlvRect(80, 80, 500, 500));
try { nodeLayout.performLayout(true, false, true); } catch (IlvGraphLayoutException e) { e.printStackTrace(); } }
|
|
|
|