/** * Gets the placeholder that is used for the {@link SingleCDockable} with * unique identifier <code>id</code>. * @param id the unique identifer of a {@link SingleCDockable} * @return the placeholder for that dockable */ public static Path getSingleDockablePlaceholder( String id ){ return new Path( "dock", "single", id ); }
/** * Gets the placeholder that is used for the {@link MultipleCDockable} with * unique identifier <code>id</code>. * @param id the unique identifer of a {@link MultipleCDockable} * @return the placeholder for that dockable */ public static Path getMultipleDockablePlaceholder( String id ){ return new Path( "dock", "multi", id ); }
public Path getPath( int index ){ switch( index ){ case 0: return new Path( "dock.ButtonContent.knob" ); case 1: return new Path( "dock.ButtonContent.icon" ); case 2: return new Path( "dock.ButtonContent.text" ); case 3: return new Path( "dock.ButtonContent.children" ); case 4: return new Path( "dock.ButtonContent.actions" ); case 5: return new Path( "dock.ButtonContent.filter" ); default: throw new IllegalArgumentException( "unkonwn property: " + index ); } }
public Path read( DataInputStream in, PlaceholderStrategy placeholders ) throws IOException{ byte version = in.readByte(); if( version != 0 ){ throw new IOException( "unknown version: " + version ); } if( in.readBoolean() ){ return new Path( in.readUTF() ); } else{ return null; } }
public Path read( DataInputStream in, PlaceholderStrategy placeholders ) throws IOException{ byte version = in.readByte(); if( version != 0 ){ throw new IOException( "unknown version: " + version ); } if( in.readBoolean() ){ return new Path( in.readUTF() ); } else{ return null; } }
/** * Gets the identifier for the kind of {@link UIValue} that reads an {@link UIValue} of this type. * @param kind the kind of {@link UIValue} * @return the identifier to use in a map */ public Path getKind( Path kind ){ return new Path( key ).append( kind ); } }
public PlaceholderKey( DataInputStream in, Version version ) throws IOException{ shared = in.readBoolean(); if( Version.VERSION_1_1_1.compareTo( version ) <= 0 ){ if( in.readBoolean() ){ anchor = in.readUTF(); } } placeholders = new Path[ in.readInt() ]; for( int i = 0; i < placeholders.length; i++ ){ placeholders[i] = new Path( in.readUTF() ); } }
/** * Converts the station of this converter into a {@link PlaceholderMap}. * @return the map * @see SplitDockStation#getPlaceholders() */ public PlaceholderMap getPlaceholders(){ final PlaceholderMap result = new PlaceholderMap( new Path( "dock.SplitDockStation" ), 0 ); handleChild( result, getRoot( station ), "" ); return result; }
public void load( DataInputStream in ) throws IOException { Version version = Version.read( in ); version.checkCurrent(); boolean version8 = Version.VERSION_1_0_8.compareTo( version ) <= 0; index = in.readInt(); placeholder = null; if( version8 ){ if( in.readBoolean() ){ placeholder = new Path( in.readUTF() ); } } }
/** * Creates a new preference * @param properties the properties to access */ public KeyStrokeCancelOperation( DockProperties properties ){ super( properties, CControl.KEY_CANCEL_OPERATION, Path.TYPE_KEYSTROKE_PATH, new Path( "dock.common.control.cancel" ) ); setLabelId( "preference.shortcut.cancel.label" ); setDescriptionId( "preference.shortcut.cancel.description" ); } }
public Path read( XElement element, PlaceholderStrategy placeholders ){ XElement xtype = element.getElement( "type" ); if( xtype == null ){ return null; } return new Path( xtype.getString() ); }
/** * Creates a new preference * @param properties the properties to access */ public KeyStrokeMinimizePreference( DockProperties properties ){ super( properties, CControl.KEY_GOTO_MINIMIZED, Path.TYPE_KEYSTROKE_PATH, new Path( "dock.common.control.minimize" ) ); setLabelId( "preference.shortcut.minimize.label" ); setDescriptionId( "preference.shortcut.minimize.description" ); } }
/** * Creates a new preference * @param properties the properties to access */ public KeyStrokeMaximizePreference( DockProperties properties ){ super( properties, CControl.KEY_GOTO_MAXIMIZED, Path.TYPE_KEYSTROKE_PATH, new Path( "dock.common.control.maximize" ) ); setLabelId( "preference.shortcut.maximize.label" ); setDescriptionId( "preference.shortcut.maximize.description" ); } }
/** * Creates a new preference * @param properties to read and write the value of this preference */ public KeyStrokeInitSelectorPreference( DockProperties properties ){ super( properties, DockableSelector.INIT_SELECTION, Path.TYPE_KEYSTROKE_PATH, new Path( "dock.DockableSelector.INIT_SELECTION" )); setLabelId( "preference.shortcuts.init_selection.label" ); setDescriptionId( "preference.shortcuts.init_selection.description" ); setDefaultValue( KeyStroke.getKeyStroke( KeyEvent.VK_E, KeyEvent.SHIFT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK ) ); } }
/** * Creates a new preference * @param properties the properties to access */ public KeyStrokeMaximizeChangePreference( DockProperties properties ){ super( properties, CControl.KEY_MAXIMIZE_CHANGE, Path.TYPE_KEYSTROKE_PATH, new Path( "dock.common.control.maximize_change" ) ); setLabelId( "preference.shortcut.maximize_change.label" ); setDescriptionId( "preference.shortcut.maximize_change.description" ); setDefaultValue( KeyStroke.getKeyStroke( KeyEvent.VK_M, KeyEvent.CTRL_DOWN_MASK )); } }
@Override public PlaceholderMap getPlaceholders( ToolbarContainerDockStation station, Map<Dockable, Integer> children ){ final PlaceholderMap result = new PlaceholderMap( new Path( "dock.ToolbarContainerStation" ), 0 ); result.put( result.newKey( "content" ), "list", convert( station.getPlaceholderStrategy(), station.getDockables(), children ) ); return result; }
/** * Creates a new preference. * @param properties the properties which is read by this preference */ public BubbleColorSchemePreference( DockProperties properties ){ super( properties, BubbleTheme.BUBBLE_COLOR_SCHEME, new Path( "dock.theme.bubble.colorscheme" ), new BubbleColorSchemeChoice( properties ) ); setLabelId( "preference.theme.bubble.color.label" ); setDescriptionId( "preference.theme.bubble.color.description" ); } }
/** * Creates a new model. * @param control the control whose settings this model represents */ public CLayoutPreferenceModel( CControl control ){ super( control.getController() ); add( tabPlacement = new TabPlacementPreference( control.intern().getDockProperties(), new Path( "dock.layout.tabplacement" ))); add( tabContentFilter = new TabContentFilterPreference( control.intern().getDockProperties(), new Path( "dock.layout.tabcontentfilter" ))); add( theme = new ThemePreference( control.intern().getDockProperties(), control.getThemes() )); }
/** * Creates a new preference * @param properties to read and write the value of this preference */ public ModifierMaskNoCombinationPreference( DockProperties properties ){ super( properties, DockRelocatorMode.NO_COMBINATION_MASK, Path.TYPE_MODIFIER_MASK_PATH, new Path( "dock.DockRelocatorMode.NO_COMBINATION_MASK" ) ); setLabelId( "preference.shortcuts.no_combination_mask.label" ); setDescriptionId( "preference.shortcuts.no_combination_mask.description" ); setDefaultValue( DockRelocatorMode.NO_COMBINATION_MASK.getDefault( null ) ); } }
/** * Creates a new preference * @param properties to read and write the value of this preference */ public ModifierMaskScreenOnlyPreference( DockProperties properties ){ super( properties, DockRelocatorMode.SCREEN_MASK, Path.TYPE_MODIFIER_MASK_PATH, new Path( "dock.DockRelocatorMode.SCREEN_MASK" ) ); setLabelId( "preference.shortcuts.screen_only.label" ); setDescriptionId( "preference.shortcuts.screen_only.description" ); setDefaultValue( DockRelocatorMode.SCREEN_MASK.getDefault( null ) ); } }