Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/kmcaster.git

Formatting, minor reorg

Author DaveJarvis <email>
Date 2020-07-31 20:44:32 GMT-0700
Commit c1255fb5da5ab210b367dacd38a702307911120a
Parent 998888b
src/main/com/whitemagicsoftware/kmcaster/HardwareImages.java
mouseStates.put( stateOff, mouseReleased.getKey() );
mSwitches.put( key, mouseStates );
- }
- catch( final Exception e ) {
+ } catch( final Exception e ) {
// Not all mouse buttons map to images.
}
final var scaledInsets = insets.scale( scale );
- final var hardwareComponent = createHardwareComponent( scaledInsets );
+ final var component = createHardwareComponent( scaledInsets );
- hardwareComponent.put( stateOn, imageDn.getKey() );
- hardwareComponent.put( stateOff, imageUp.getKey() );
+ component.put( stateOn, imageDn.getKey() );
+ component.put( stateOff, imageUp.getKey() );
- mSwitches.put( key, hardwareComponent );
+ mSwitches.put( key, component );
}
}
src/main/com/whitemagicsoftware/kmcaster/SvgRasterizer.java
*/
public final class SvgRasterizer {
- public final static Map<Object, Object> RENDERING_HINTS = Map.of(
+ private final static Map<Object, Object> RENDERING_HINTS = Map.of(
KEY_ANTIALIASING,
VALUE_ANTIALIAS_ON,
src/main/com/whitemagicsoftware/kmcaster/UserSettings.java
@CommandLine.Option(
names = {"-s", "--size"},
- description = "Application size (${DEFAULT-VALUE} pixels)",
+ description =
+ "Application size (${DEFAULT-VALUE} pixels)",
paramLabel = "height",
defaultValue = "100"
)
private int mHeight = 100;
/**
- * Milliseconds to wait before releasing (clearing) the regular key.
+ * Milliseconds to wait before releasing (clearing) a regular key.
*/
@CommandLine.Option(
names = {"-a", "--delay-alphanum"},
- description = "Delay for releasing non-modifier keys (${DEFAULT-VALUE} " +
- "milliseconds)",
+ description =
+ "Delay for releasing regular keys (${DEFAULT-VALUE} milliseconds)",
paramLabel = "delay",
defaultValue = "250"
@CommandLine.Option(
names = {"-m", "--delay-modifier"},
- description = "Delay for releasing modifier keys (${DEFAULT-VALUE} " +
- "milliseconds)",
+ description =
+ "Delay for releasing modifier keys (${DEFAULT-VALUE} milliseconds)",
paramLabel = "delay",
defaultValue = "150"
)
private int mDelayKeyModifier = 150;
/**
- * Milliseconds to wait before releasing (clearing) any mouse button.
+ * Milliseconds to wait before releasing (clearing) a mouse button.
*/
@CommandLine.Option(
names = {"-b", "--delay-button"},
- description = "Delay for releasing mouse buttons (${DEFAULT-VALUE} " +
- "milliseconds)",
+ description =
+ "Delay for releasing mouse buttons (${DEFAULT-VALUE} milliseconds)",
paramLabel = "delay",
defaultValue = "200"
mKmCaster.init();
return 0;
- }
-
- /**
- * This will return the user-specified height
- *
- * @return The application height, in pixels.
- */
- public int getHeight() {
- return mHeight < MIN_HEIGHT_PX ? MIN_HEIGHT_PX : mHeight;
}
public Dimension createAppDimensions() {
return new Dimension( 1024 + getHeight(), getHeight() );
+ }
+
+ /**
+ * This will return the user-specified height
+ *
+ * @return The application height, in pixels.
+ */
+ private int getHeight() {
+ return mHeight < MIN_HEIGHT_PX ? MIN_HEIGHT_PX : mHeight;
}
}
Delta 25 lines added, 25 lines removed