From aca4841ccd92c51c178285fe5d49a225765ae0a1 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 30 Dec 2001 08:18:46 +0000 Subject: [PATCH] Moved BuildAlert from inner class to top-level class. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270470 13f79535-47bb-0310-9956-ffa450edef68 --- .../taskdefs/optional/sound/BuildAlert.java | 81 +++++++++++++++++++ .../taskdefs/optional/sound/BuildAlert.java | 81 +++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java create mode 100644 proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java new file mode 100644 index 000000000..e7f65bc33 --- /dev/null +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java @@ -0,0 +1,81 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE.txt file. + */ +package org.apache.tools.ant.taskdefs.optional.sound; + +import java.io.File; + +/** + * A class to be extended by any BuildAlert's that require the output of + * sound. + */ +public class BuildAlert +{ + private File m_source; + private int m_loops; + private Long m_duration; + + /** + * Sets the duration in milliseconds the file should be played. + * + * @param duration The new Duration value + */ + public void setDuration( Long duration ) + { + m_duration = duration; + } + + /** + * Sets the number of times the source file should be played. + * + * @param loops the number of loops to play the source file + */ + public void setLoops( int loops ) + { + m_loops = loops; + } + + /** + * Sets the location of the file to get the audio. + * + * @param source the name of a sound-file directory or of the audio file + */ + public void setSource( final File source ) + { + m_source = source; + } + + /** + * Gets the duration in milliseconds the file should be played. + * + * @return The Duration value + */ + public Long getDuration() + { + return m_duration; + } + + /** + * Sets the number of times the source file should be played. + * + * @return the number of loops to play the source file + */ + public int getLoops() + { + return m_loops; + } + + /** + * Gets the location of the file to get the audio. + * + * @return The Source value + */ + public File getSource() + { + return m_source; + } +} diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java new file mode 100644 index 000000000..e7f65bc33 --- /dev/null +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/sound/BuildAlert.java @@ -0,0 +1,81 @@ +/* + * Copyright (C) The Apache Software Foundation. All rights reserved. + * + * This software is published under the terms of the Apache Software License + * version 1.1, a copy of which has been included with this distribution in + * the LICENSE.txt file. + */ +package org.apache.tools.ant.taskdefs.optional.sound; + +import java.io.File; + +/** + * A class to be extended by any BuildAlert's that require the output of + * sound. + */ +public class BuildAlert +{ + private File m_source; + private int m_loops; + private Long m_duration; + + /** + * Sets the duration in milliseconds the file should be played. + * + * @param duration The new Duration value + */ + public void setDuration( Long duration ) + { + m_duration = duration; + } + + /** + * Sets the number of times the source file should be played. + * + * @param loops the number of loops to play the source file + */ + public void setLoops( int loops ) + { + m_loops = loops; + } + + /** + * Sets the location of the file to get the audio. + * + * @param source the name of a sound-file directory or of the audio file + */ + public void setSource( final File source ) + { + m_source = source; + } + + /** + * Gets the duration in milliseconds the file should be played. + * + * @return The Duration value + */ + public Long getDuration() + { + return m_duration; + } + + /** + * Sets the number of times the source file should be played. + * + * @return the number of loops to play the source file + */ + public int getLoops() + { + return m_loops; + } + + /** + * Gets the location of the file to get the audio. + * + * @return The Source value + */ + public File getSource() + { + return m_source; + } +}