net.sf.latexdraw.util
Class LCommandLine

java.lang.Object
  extended by net.sf.latexdraw.util.LCommandLine

public class LCommandLine
extends java.lang.Object

Defines a command line parser for latexdraw.

This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

11/28/08

Version:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
static class LCommandLine.CmdLineState
          The different states of the command line.
 
Field Summary
protected  java.lang.String filename
          The file name given in argument.
static java.lang.String OPTION_HELP
          The option for show the help.
 
Constructor Summary
LCommandLine()
          Creates and initialises a command line parser.
 
Method Summary
 void displayHelp()
          Displays the different options of the command line of latexdraw.
 java.lang.String getFilename()
           
static java.lang.String getFileName(java.lang.String[] args)
          deduces the filename that will be open, from the set of parameters.
 LCommandLine.CmdLineState parse(java.lang.String[] args)
          Parses the given arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_HELP

public static final java.lang.String OPTION_HELP
The option for show the help.

See Also:
Constant Field Values

filename

protected java.lang.String filename
The file name given in argument.

Constructor Detail

LCommandLine

public LCommandLine()
Creates and initialises a command line parser.

Method Detail

parse

public LCommandLine.CmdLineState parse(java.lang.String[] args)
Parses the given arguments.

Parameters:
args - The arguments to parse.
Returns:
The result of the parsing.
Since:
2.0.3

getFileName

public static java.lang.String getFileName(java.lang.String[] args)
deduces the filename that will be open, from the set of parameters.

Parameters:
args - The parameters given to latexdraw.
Returns:
The filename that will be open.
Since:
2.0.3

displayHelp

public void displayHelp()
Displays the different options of the command line of latexdraw.

Since:
2.0.3

getFilename

public java.lang.String getFilename()
Returns:
The filename.
Since:
2.0.3