本文整理汇总了Java中psd.parser.layer.LayerType.HIDDEN属性的典型用法代码示例。如果您正苦于以下问题:Java LayerType.HIDDEN属性的具体用法?Java LayerType.HIDDEN怎么用?Java LayerType.HIDDEN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类psd.parser.layer.LayerType
的用法示例。
在下文中一共展示了LayerType.HIDDEN属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTreeModel
/**
* createTreeModel
* Run the layers to create the images.
* @param layers
* @param prefix
*/
public static void createTreeModel(List<Layer> layers, String prefix) {
//
// Run all sub-layers
//
for (Layer l : layers) {
if (!l.isVisible())
continue;
if (l.getType() == LayerType.HIDDEN)
continue;
if (l.getType() == LayerType.FOLDER) {
if (l.getLayersCount() > 0) {
List<Layer> ls = getLayers(l);
createTreeModel(ls, prefix);
}
exportLayer(l, prefix);
} else {
exportLayer(l, prefix);
}
}
}
示例2: createTreeModel
private TreeModel createTreeModel(List<Layer> layers) {
NamedVector<Object> currLevel = new NamedVector<Object>();
Queue<NamedVector<Object>> levelQueue = new LinkedList<NamedVector<Object>>();
for (Layer l : layers) {
if (l.getType() == LayerType.HIDDEN) {
levelQueue.add(currLevel);
currLevel = new NamedVector<Object>();
}
else if (l.getType() == LayerType.FOLDER) {
currLevel.setName(l.toString());
Vector<Object> prevLevel = currLevel;
if (l.getLayersCount() > 0) {
List<Layer> ls = getLayers(l);
createTreeModel(ls);
}
currLevel.add(0, prevLevel);
}
else {
currLevel.add(0, new NamedPsdLayer(l));
}
}
DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
DynamicUtilTreeNode.createChildren(root, currLevel);
return new DefaultTreeModel(root);
}
示例3: parse
@Override
public void parse(PsdInputStream stream, String tag, int size) throws IOException {
int dividerType = stream.readInt();
LayerType type = LayerType.NORMAL;
switch (dividerType) {
case 1:
case 2:
type = LayerType.FOLDER;
break;
case 3:
type = LayerType.HIDDEN;
break;
}
handler.sectionDividerParsed(type);
}