    001    /*
    002     * IAsset.java
    003     * :tabSize=8:indentSize=8:noTabs=false:
    004     * :folding=explicit:collapseFolds=1:
    005     *
    006     * Copyright (C) 2005 Matthieu Casanova
    007     *
    008     * This program is free software; you can redistribute it and/or
    009     * modify it under the terms of the GNU General Public License
    010     * as published by the Free Software Foundation; either version 2
    011     * of the License, or any later version.
    012     *
    013     * This program is distributed in the hope that it will be useful,
    014     * but WITHOUT ANY WARRANTY; without even the implied warranty of
    015     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    016     * GNU General Public License for more details.
    017     *
    018     * You should have received a copy of the GNU General Public License
    019     * along with this program; if not, write to the Free Software
    020     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    021     */
    022
    023    package sidekick;
    024
    025    //{{{ Imports
    026    import javax.swing.*;
    027    import javax.swing.text.Position;
    028    //}}}
    029
    030    /**
    031     * A block of code within a file.  Assets correspond to nodes in the
    032     * Structure Browser and folds in the SideKick folding mode.
    033     */
    034    public interface IAsset
    035    {
    036            /**
    037             * Returns the icon to be shown for the asset in the structure tree.
    038             */
    039            Icon getIcon();
    040
    041            /**
    042             * Returns a brief description of the asset to be shown in the tree.
    043             * This string is displayed in the jEdit status bar and optionally in
    044             * a tool tip (if the user has the 'show tool tips' option turned on).
    045             */
    046            String getShortString();
    047
    048            /**
    049             * Returns a full description of the asset to be shown in the view's
    050             * status bar on when the mouse is over the asset in the tree.  Only
    051             * the first line of this message will be shown in the status bar.  The
    052             * full text will be displayed in the built-in status window (if the user
    053             * has the 'show status window' option turned on).
    054             */
    055            String getLongString();
    056
    057            /**
    058             * Returns the name of the Asset.
    059             */
    060            String getName();
    061
    062            /**
    063             * Set the name of the asset
    064             */
    065            void setName(String name);
    066
    067            /**
    068             * Set the start position
    069             */
    070            void setStart(Position start);
    071
    072            /**
    073             * Returns the starting position.
    074             */
    075            Position getStart();
    076
    077            /**
    078             * Set the end position
    079             */
    080            void setEnd(Position end);
    081
    082            /**
    083             * Returns the end position.
    084             */
    085            Position getEnd();
    086
    087    }