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

net.sourceforge.plantuml.project.command.CommandNoteBottom Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.project.command;

import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.command.CommandMultilines;
import net.sourceforge.plantuml.klimt.color.NoSuchColorException;
import net.sourceforge.plantuml.klimt.creole.Display;
import net.sourceforge.plantuml.project.GanttDiagram;
import net.sourceforge.plantuml.utils.BlocLines;

public class CommandNoteBottom extends CommandMultilines {

	public CommandNoteBottom() {
		super("^note[%s]*bottom$");
	}

	@Override
	public String getPatternEnd() {
		return "^end[%s]*note$";
	}

	public CommandExecutionResult execute(GanttDiagram diagram, BlocLines lines) throws NoSuchColorException {
		lines = lines.subExtract(1, 1);
		lines = lines.removeEmptyColumns();
		final Display strings = lines.toDisplay();
		if (strings.size() > 0) {
			return diagram.addNote(strings);
		}
		return CommandExecutionResult.error("No note defined");
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy