mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
* WIP - Adds support for aliasing P25 Phase 2 tones.Playlist editor - adds editor support for alias actions * Playlist editor implementation and integration into application is complete. Adds JavaFX window monitoring to persist window size/location across application runs. Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* ******************************************************************************
|
||||
* sdrtrunk
|
||||
* Copyright (C) 2014-2019 Dennis Sheirer
|
||||
*
|
||||
* This program 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 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* *****************************************************************************
|
||||
*/
|
||||
|
||||
package io.github.dsheirer.gui.editor;
|
||||
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import javax.swing.event.DocumentListener;
|
||||
|
||||
public abstract class DocumentListenerEditor<T> extends Editor<T> implements DocumentListener
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public DocumentListenerEditor()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertUpdate( DocumentEvent e )
|
||||
{
|
||||
setModified( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeUpdate( DocumentEvent e )
|
||||
{
|
||||
setModified( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changedUpdate( DocumentEvent e ) { }
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package io.github.dsheirer.gui.editor;
|
||||
|
||||
public class EditorValidationException extends Exception
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Editor<?> mEditor;
|
||||
private String mReason;
|
||||
|
||||
public EditorValidationException( Editor<?> editor, String reason )
|
||||
{
|
||||
mEditor = editor;
|
||||
mReason = reason;
|
||||
}
|
||||
|
||||
public Editor<?> getEditor()
|
||||
{
|
||||
return mEditor;
|
||||
}
|
||||
|
||||
public String getReason()
|
||||
{
|
||||
return mReason;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package io.github.dsheirer.gui.editor;
|
||||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class EmptyValidatingEditor<T> extends ValidatingEditor<T>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public EmptyValidatingEditor( String descriptor )
|
||||
{
|
||||
setLayout( new MigLayout( "insets 0 0 0 0", "", "" ) );
|
||||
add( new JLabel( "Please select " + descriptor ), "wrap" );
|
||||
}
|
||||
|
||||
public EmptyValidatingEditor()
|
||||
{
|
||||
this( "an item" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate( Editor<T> editor ) throws EditorValidationException
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package io.github.dsheirer.gui.editor;
|
||||
|
||||
|
||||
/**
|
||||
* Editor class that allows other editors to be validated for configuration with this editor
|
||||
*/
|
||||
public abstract class ValidatingEditor<T> extends Editor<T>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Indicates if the editor argument is valid according to the settings of this editor
|
||||
*/
|
||||
public abstract void validate( Editor<T> editor ) throws EditorValidationException;
|
||||
}
|
||||
Reference in New Issue
Block a user