mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-16 18:47:33 -05:00
- cosmetics naming changes
This commit is contained in:
@@ -65,7 +65,7 @@ public abstract class AbstractTileFactory extends TileFactory
|
|||||||
private int threadPoolSize = 4;
|
private int threadPoolSize = 4;
|
||||||
private ExecutorService service;
|
private ExecutorService service;
|
||||||
|
|
||||||
// TODO the tile ua.in.smartjava.map should be static ALWAYS, regardless of the number
|
// TODO the tile map should be static ALWAYS, regardless of the number
|
||||||
// of GoogleTileFactories because each tile is, really, a singleton.
|
// of GoogleTileFactories because each tile is, really, a singleton.
|
||||||
private Map<String, Tile> tileMap = new HashMap<String, Tile>();
|
private Map<String, Tile> tileMap = new HashMap<String, Tile>();
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ public abstract class AbstractTileFactory extends TileFactory
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
tile = tileMap.get(url);
|
tile = tileMap.get(url);
|
||||||
// if its in the ua.in.smartjava.map but is low and isn't loaded yet
|
// if its in the map but is low and isn't loaded yet
|
||||||
// but we are in high mode
|
// but we are in high mode
|
||||||
if (tile.getPriority() == Tile.Priority.Low && eagerLoad && !tile.isLoaded())
|
if (tile.getPriority() == Tile.Priority.Low && eagerLoad && !tile.isLoaded())
|
||||||
{
|
{
|
||||||
@@ -208,7 +208,7 @@ public abstract class AbstractTileFactory extends TileFactory
|
|||||||
@Override
|
@Override
|
||||||
public Thread newThread(Runnable r)
|
public Thread newThread(Runnable r)
|
||||||
{
|
{
|
||||||
Thread t = new Thread(r, "ua.in.smartjava.map tile fetcher-pool-" + count++);
|
Thread t = new Thread(r, "map tile fetcher-pool-" + count++);
|
||||||
t.setPriority(Thread.MIN_PRIORITY);
|
t.setPriority(Thread.MIN_PRIORITY);
|
||||||
t.setDaemon(true);
|
t.setDaemon(true);
|
||||||
return t;
|
return t;
|
||||||
|
|||||||
@@ -59,9 +59,9 @@ public class EmptyTileFactory extends TileFactory
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an instance of an empty tile for the given tile position and zoom on the world ua.in.smartjava.map.
|
* Gets an instance of an empty tile for the given tile position and zoom on the world map.
|
||||||
* @param x The tile's x position on the world ua.in.smartjava.map.
|
* @param x The tile's x position on the world map.
|
||||||
* @param y The tile's y position on the world ua.in.smartjava.map.
|
* @param y The tile's y position on the world map.
|
||||||
* @param zoom The current zoom level.
|
* @param zoom The current zoom level.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public final class GeoUtil
|
|||||||
/**
|
/**
|
||||||
* @param zoom the zoom level
|
* @param zoom the zoom level
|
||||||
* @param info the tile factory info
|
* @param info the tile factory info
|
||||||
* @return the size of the ua.in.smartjava.map at the given zoom, in tiles (num tiles tall by num tiles wide)
|
* @return the size of the map at the given zoom, in tiles (num tiles tall by num tiles wide)
|
||||||
*/
|
*/
|
||||||
public static Dimension getMapSize(int zoom, TileFactoryInfo info)
|
public static Dimension getMapSize(int zoom, TileFactoryInfo info)
|
||||||
{
|
{
|
||||||
@@ -50,17 +50,17 @@ public final class GeoUtil
|
|||||||
{
|
{
|
||||||
// int x = (int)coord.getX();
|
// int x = (int)coord.getX();
|
||||||
// int y = (int)coord.getY();
|
// int y = (int)coord.getY();
|
||||||
// if off the ua.in.smartjava.map to the top or left
|
// if off the map to the top or left
|
||||||
if (x < 0 || y < 0)
|
if (x < 0 || y < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// if of the ua.in.smartjava.map to the right
|
// if of the map to the right
|
||||||
if (info.getMapCenterInPixelsAtZoom(zoomLevel).getX() * 2 <= x * info.getTileSize(zoomLevel))
|
if (info.getMapCenterInPixelsAtZoom(zoomLevel).getX() * 2 <= x * info.getTileSize(zoomLevel))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// if off the ua.in.smartjava.map to the bottom
|
// if off the map to the bottom
|
||||||
if (info.getMapCenterInPixelsAtZoom(zoomLevel).getY() * 2 <= y * info.getTileSize(zoomLevel))
|
if (info.getMapCenterInPixelsAtZoom(zoomLevel).getY() * 2 <= y * info.getTileSize(zoomLevel))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -136,8 +136,8 @@ public final class GeoUtil
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the ua.in.smartjava.map bounds.
|
* Gets the map bounds.
|
||||||
* @param mapViewer The ua.in.smartjava.map viewer.
|
* @param mapViewer The map viewer.
|
||||||
* @return Returns the bounds.
|
* @return Returns the bounds.
|
||||||
*/
|
*/
|
||||||
public static GeoBounds getMapBounds(JXMapViewer mapViewer)
|
public static GeoBounds getMapBounds(JXMapViewer mapViewer)
|
||||||
@@ -147,9 +147,9 @@ public final class GeoUtil
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the bounds as a set of two <code>GeoPosition</code> objects.
|
* Gets the bounds as a set of two <code>GeoPosition</code> objects.
|
||||||
* @param mapViewer The ua.in.smartjava.map viewer.
|
* @param mapViewer The map viewer.
|
||||||
* @return Returns the set of two <code>GeoPosition</code> objects that represent the north west and south east
|
* @return Returns the set of two <code>GeoPosition</code> objects that represent the north west and south east
|
||||||
* corners of the ua.in.smartjava.map.
|
* corners of the map.
|
||||||
*/
|
*/
|
||||||
private static Set<GeoPosition> getMapGeoBounds(JXMapViewer mapViewer)
|
private static Set<GeoPosition> getMapGeoBounds(JXMapViewer mapViewer)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class IconEditor extends JFrame implements ActionListener
|
|||||||
if(selected != null)
|
if(selected != null)
|
||||||
{
|
{
|
||||||
int choice = JOptionPane.showConfirmDialog(IconEditor.this,
|
int choice = JOptionPane.showConfirmDialog(IconEditor.this,
|
||||||
"Are you sure you want to delete this ua.in.smartjava.icon?", "Delete Icon?", JOptionPane.YES_NO_OPTION);
|
"Are you sure you want to delete this icon?", "Delete Icon?", JOptionPane.YES_NO_OPTION);
|
||||||
|
|
||||||
if(choice == JOptionPane.YES_OPTION)
|
if(choice == JOptionPane.YES_OPTION)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class IconSelector extends JDialog implements DocumentListener
|
|||||||
* Window for selecting an Icon to add to the Icon Model
|
* Window for selecting an Icon to add to the Icon Model
|
||||||
*
|
*
|
||||||
* @param owner for this modal dialog
|
* @param owner for this modal dialog
|
||||||
* @param iconTableModel to receive the added/selected ua.in.smartjava.icon
|
* @param iconTableModel to receive the added/selected icon
|
||||||
*/
|
*/
|
||||||
public IconSelector(Frame owner, IconTableModel iconTableModel)
|
public IconSelector(Frame owner, IconTableModel iconTableModel)
|
||||||
{
|
{
|
||||||
@@ -84,7 +84,7 @@ public class IconSelector extends JDialog implements DocumentListener
|
|||||||
|
|
||||||
// fileChooser.setSelectedFile(null);
|
// fileChooser.setSelectedFile(null);
|
||||||
|
|
||||||
//Add a custom file ua.in.smartjava.filter and disable the default
|
//Add a custom file filter and disable the default
|
||||||
fileChooser.addChoosableFileFilter(new ImageFilter());
|
fileChooser.addChoosableFileFilter(new ImageFilter());
|
||||||
fileChooser.setAcceptAllFileFilterUsed(false);
|
fileChooser.setAcceptAllFileFilterUsed(false);
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the ua.in.smartjava.icon to the model
|
* Adds the icon to the model
|
||||||
*/
|
*/
|
||||||
public void add(Icon icon)
|
public void add(Icon icon)
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the ua.in.smartjava.icon from the model
|
* Removes the icon from the model
|
||||||
*/
|
*/
|
||||||
public void remove(Icon icon)
|
public void remove(Icon icon)
|
||||||
{
|
{
|
||||||
@@ -172,7 +172,7 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current default ua.in.smartjava.icon
|
* Returns the current default icon
|
||||||
*/
|
*/
|
||||||
public Icon getDefaultIcon()
|
public Icon getDefaultIcon()
|
||||||
{
|
{
|
||||||
@@ -180,7 +180,7 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if the ua.in.smartjava.icon argument is the current default ua.in.smartjava.icon
|
* Indicates if the icon argument is the current default icon
|
||||||
*/
|
*/
|
||||||
public boolean isDefaultIcon(Icon icon)
|
public boolean isDefaultIcon(Icon icon)
|
||||||
{
|
{
|
||||||
@@ -188,10 +188,10 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if this model contains an ua.in.smartjava.icon with the specified name
|
* Indicates if this model contains an icon with the specified name
|
||||||
*
|
*
|
||||||
* @param name to check
|
* @param name to check
|
||||||
* @return true if name is not null and not empty and the internal ua.in.smartjava.map contains an ua.in.smartjava.icon matching name
|
* @return true if name is not null and not empty and the internal map contains an icon matching name
|
||||||
*/
|
*/
|
||||||
public boolean hasIcon(String name)
|
public boolean hasIcon(String name)
|
||||||
{
|
{
|
||||||
@@ -214,7 +214,7 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the default ua.in.smartjava.icon to the ua.in.smartjava.icon with the specified name, or to a default ua.in.smartjava.icon of the named ua.in.smartjava.icon does not exist
|
* Sets the default icon to the icon with the specified name, or to a default icon of the named icon does not exist
|
||||||
*/
|
*/
|
||||||
public void setDefaultIcon(String name)
|
public void setDefaultIcon(String name)
|
||||||
{
|
{
|
||||||
@@ -238,7 +238,7 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the named ua.in.smartjava.icon or the default ua.in.smartjava.icon if the named ua.in.smartjava.icon does not exist
|
* Returns the named icon or the default icon if the named icon does not exist
|
||||||
*/
|
*/
|
||||||
public Icon getIcon(String name)
|
public Icon getIcon(String name)
|
||||||
{
|
{
|
||||||
@@ -258,7 +258,7 @@ public class IconTableModel extends AbstractTableModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new ua.in.smartjava.icon set from a snapshot of the icons contained in this model
|
* Creates a new icon set from a snapshot of the icons contained in this model
|
||||||
*/
|
*/
|
||||||
public IconSet getIconSet()
|
public IconSet getIconSet()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class ImageFilter extends FileFilter
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//The description of this ua.in.smartjava.filter
|
//The description of this filter
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
return "Images (*.gif,*.jpg,*.png.";
|
return "Images (*.gif,*.jpg,*.png.";
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes call header (HDU) and voice frame (LDU1/LDU2) messages to decode ua.in.smartjava.audio and to determine the
|
* Processes call header (HDU) and voice frame (LDU1/LDU2) messages to decode audio and to determine the
|
||||||
* encrypted ua.in.smartjava.audio status of a call event. Only the HDU and LDU2 messages convey encrypted call status. If an
|
* encrypted audio status of a call event. Only the HDU and LDU2 messages convey encrypted call status. If an
|
||||||
* LDU1 ua.in.smartjava.message is received without a preceding HDU ua.in.smartjava.message, then the LDU1 ua.in.smartjava.message is cached until the first
|
* LDU1 message is received without a preceding HDU message, then the LDU1 message is cached until the first
|
||||||
* LDU2 ua.in.smartjava.message is received and the encryption state can be determined. Both the LDU1 and the LDU2 ua.in.smartjava.message are
|
* LDU2 message is received and the encryption state can be determined. Both the LDU1 and the LDU2 message are
|
||||||
* then processed for ua.in.smartjava.audio if the call is unencrypted.
|
* then processed for audio if the call is unencrypted.
|
||||||
*/
|
*/
|
||||||
public void receive(Message message)
|
public void receive(Message message)
|
||||||
{
|
{
|
||||||
@@ -109,8 +109,8 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
}
|
}
|
||||||
else if(message instanceof LDU1Message)
|
else if(message instanceof LDU1Message)
|
||||||
{
|
{
|
||||||
//When we receive an LDU1 ua.in.smartjava.message with first receiving the HDU ua.in.smartjava.message, cache the LDU1 Message
|
//When we receive an LDU1 message with first receiving the HDU message, cache the LDU1 Message
|
||||||
//until we can determine the encrypted call state from the next LDU2 ua.in.smartjava.message
|
//until we can determine the encrypted call state from the next LDU2 message
|
||||||
mCachedLDU1Message = (LDU1Message)message;
|
mCachedLDU1Message = (LDU1Message)message;
|
||||||
}
|
}
|
||||||
else if(message instanceof LDU2Message)
|
else if(message instanceof LDU2Message)
|
||||||
@@ -132,7 +132,7 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes an ua.in.smartjava.audio packet by decoding the IMBE ua.in.smartjava.audio frames and rebroadcasting them as PCM ua.in.smartjava.audio packets.
|
* Processes an audio packet by decoding the IMBE audio frames and rebroadcasting them as PCM audio packets.
|
||||||
*/
|
*/
|
||||||
private void processAudio(LDUMessage ldu)
|
private void processAudio(LDUMessage ldu)
|
||||||
{
|
{
|
||||||
@@ -149,12 +149,12 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Encrypted ua.in.smartjava.audio processing not implemented
|
//Encrypted audio processing not implemented
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads ua.in.smartjava.audio frame processing chain. Constructs an imbe targetdataline
|
* Loads audio frame processing chain. Constructs an imbe targetdataline
|
||||||
* to receive the raw imbe frames. Adds an IMBE to 8k PCM format conversion
|
* to receive the raw imbe frames. Adds an IMBE to 8k PCM format conversion
|
||||||
* stream wrapper. Finally, adds an upsampling (8k to 48k) stream wrapper.
|
* stream wrapper. Finally, adds an upsampling (8k to 48k) stream wrapper.
|
||||||
*/
|
*/
|
||||||
@@ -181,9 +181,9 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
if(!mLibraryLoadStatusLogged)
|
if(!mLibraryLoadStatusLogged)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("JMBE ua.in.smartjava.audio conversion library [");
|
sb.append("JMBE audio conversion library [");
|
||||||
sb.append(library.getVersion());
|
sb.append(library.getVersion());
|
||||||
sb.append("] successfully loaded - P25 ua.in.smartjava.audio will be available");
|
sb.append("] successfully loaded - P25 audio will be available");
|
||||||
|
|
||||||
mLog.info(sb.toString());
|
mLog.info(sb.toString());
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
{
|
{
|
||||||
if(!mLibraryLoadStatusLogged)
|
if(!mLibraryLoadStatusLogged)
|
||||||
{
|
{
|
||||||
mLog.info("JMBE ua.in.smartjava.audio conversion library NOT FOUND");
|
mLog.info("JMBE audio conversion library NOT FOUND");
|
||||||
mLibraryLoadStatusLogged = true;
|
mLibraryLoadStatusLogged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
{
|
{
|
||||||
if(!mLibraryLoadStatusLogged)
|
if(!mLibraryLoadStatusLogged)
|
||||||
{
|
{
|
||||||
mLog.error("Couldn't find/load JMBE ua.in.smartjava.audio conversion library");
|
mLog.error("Couldn't find/load JMBE audio conversion library");
|
||||||
mLibraryLoadStatusLogged = true;
|
mLibraryLoadStatusLogged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -216,7 +216,7 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
{
|
{
|
||||||
if(!mLibraryLoadStatusLogged)
|
if(!mLibraryLoadStatusLogged)
|
||||||
{
|
{
|
||||||
mLog.error("Couldn't instantiate JMBE ua.in.smartjava.audio conversion library class");
|
mLog.error("Couldn't instantiate JMBE audio conversion library class");
|
||||||
mLibraryLoadStatusLogged = true;
|
mLibraryLoadStatusLogged = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
{
|
{
|
||||||
if(!mLibraryLoadStatusLogged)
|
if(!mLibraryLoadStatusLogged)
|
||||||
{
|
{
|
||||||
mLog.error("Couldn't load JMBE ua.in.smartjava.audio conversion library due to "
|
mLog.error("Couldn't load JMBE audio conversion library due to "
|
||||||
+ "security restrictions");
|
+ "security restrictions");
|
||||||
mLibraryLoadStatusLogged = true;
|
mLibraryLoadStatusLogged = true;
|
||||||
}
|
}
|
||||||
@@ -245,8 +245,8 @@ public class P25AudioModule extends Module implements Listener<Message>, IAudioP
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper for squelch state to process end of call actions. At call end the encrypted call state established
|
* Wrapper for squelch state to process end of call actions. At call end the encrypted call state established
|
||||||
* flag is reset so that the encrypted ua.in.smartjava.audio state for the next call can be properly detected and we send an
|
* flag is reset so that the encrypted audio state for the next call can be properly detected and we send an
|
||||||
* END ua.in.smartjava.audio packet so that downstream processors like the ua.in.smartjava.audio recorder can properly close out a call sequence.
|
* END audio packet so that downstream processors like the audio recorder can properly close out a call sequence.
|
||||||
*/
|
*/
|
||||||
public class SquelchStateListener implements Listener<SquelchState>
|
public class SquelchStateListener implements Listener<SquelchState>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,11 +26,11 @@ public class TSBKMessageFilterSet extends FilterSet<Message>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
// public boolean passes( Message ua.in.smartjava.message )
|
// public boolean passes( Message message )
|
||||||
// {
|
// {
|
||||||
// if( mEnabled && canProcess( ua.in.smartjava.message ) )
|
// if( mEnabled && canProcess( message ) )
|
||||||
// {
|
// {
|
||||||
// TSBKMessage tsbk = (TSBKMessage)ua.in.smartjava.message;
|
// TSBKMessage tsbk = (TSBKMessage) message;
|
||||||
//
|
//
|
||||||
// switch( tsbk.getVendor() )
|
// switch( tsbk.getVendor() )
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package ua.in.smartjava.module.decode.p25.reference;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The Data Unit ID (DUID) is part of the Network ID (NID) field and indicates
|
* The Data Unit ID (DUID) is part of the Network ID (NID) field and indicates
|
||||||
* the type of ua.in.smartjava.message.
|
* the type of message.
|
||||||
*/
|
*/
|
||||||
public enum DataUnitID
|
public enum DataUnitID
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user