All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.vectorpublish.desktop.vp.split.SplitNode Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2016, Peter Rader. All rights reserved.
 *  ___ ___               __                 ______         __     __  __         __
 * |   |   |.-----..----.|  |_ .-----..----.|   __ \.--.--.|  |--.|  ||__|.-----.|  |--.
 * |   |   ||  -__||  __||   _||  _  ||   _||    __/|  |  ||  _  ||  ||  ||__ --||     |
 *  \_____/ |_____||____||____||_____||__|  |___|   |_____||_____||__||__||_____||__|__|
 *
 * http://www.gnu.org/licenses/gpl-3.0.html
 */
package net.vectorpublish.desktop.vp.split;

import net.vectorpublish.desktop.vp.api.vpd.ModificationContext;
import net.vectorpublish.desktop.vp.api.vpd.ModificationContext.LayerNodeImpl;

public class SplitNode extends LayerNodeImpl {

	private final Split split;

	public SplitNode(ModificationContext ctx, LayerNodeImpl parent, int border, float percent, boolean vertical) {
		ctx.super(parent);
		split = new Split(ctx.getDocument(), border, percent, vertical);
	}

	public SplitNode(ModificationContext ctx, int border, float percent, boolean vertical) {
		ctx.super();
		split = new Split(ctx.getDocument(), border, percent, vertical);
	}

	@Override
	public Split getParticipant() {
		return split;
	}

	@Override
	public boolean getAllowsChildren() {
		return false;
	}

	@Override
	public String toString() {
		return split.toString();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy