本文整理汇总了Java中org.fit.layout.model.Area.isVerticalSeparator方法的典型用法代码示例。如果您正苦于以下问题:Java Area.isVerticalSeparator方法的具体用法?Java Area.isVerticalSeparator怎么用?Java Area.isVerticalSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fit.layout.model.Area
的用法示例。
在下文中一共展示了Area.isVerticalSeparator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findSeparatorsAround
import org.fit.layout.model.Area; //导入方法依赖的package包/类
private Neighborhood findSeparatorsAround(AreaImpl area)
{
Neighborhood ret = new Neighborhood(area);
Area cand;
cand = findNeigborTop(area);
if (cand != null && cand.isHorizontalSeparator())
ret.neighbors[TOP] = cand;
cand = findNeigborRight(area);
if (cand != null && cand.isVerticalSeparator())
ret.neighbors[RIGHT] = cand;
cand = findNeigborBottom(area);
if (cand != null && cand.isHorizontalSeparator())
ret.neighbors[BOTTOM] = cand;
cand = findNeigborLeft(area);
if (cand != null && cand.isVerticalSeparator())
ret.neighbors[LEFT] = cand;
return ret;
}
示例2: findSeparatos
import org.fit.layout.model.Area; //导入方法依赖的package包/类
private List<Area> findSeparatos(Area root, boolean horizontal)
{
List<Area> ret = new Vector<Area>();
for (int i = 0; i < root.getChildCount(); i++)
{
final Area child = root.getChildArea(i);
if ((horizontal && child.isHorizontalSeparator()) || (!horizontal && child.isVerticalSeparator()))
{
ret.add(child);
}
}
return ret;
}
示例3: allowsPair
import org.fit.layout.model.Area; //导入方法依赖的package包/类
public boolean allowsPair(Area cand)
{
if (s1.isHorizontalSeparator() && cand.isHorizontalSeparator())
{
//return s1.getX1() == cand.getX1() && s1.getX2() == cand.getX2();
return s1.getBounds().intersectsX(cand.getBounds());
}
else if (s1.isVerticalSeparator() && cand.isVerticalSeparator())
{
//return s1.getY1() == cand.getY1() && s1.getY2() == cand.getY2();
return s1.getBounds().intersectsY(cand.getBounds());
}
else
return false;
}
示例4: candidateDistance
import org.fit.layout.model.Area; //导入方法依赖的package包/类
public int candidateDistance(Area cand)
{
if (s1.isHorizontalSeparator() && cand.isHorizontalSeparator())
{
return cand.getY1() - s1.getY2();
}
else if (s1.isVerticalSeparator() && cand.isVerticalSeparator())
{
return cand.getX1() - s1.getX2();
}
else
return -1;
}