if ( !inQuotedString && !isDelimiter( token, aDelimiters ) ) iter.set( unquote( token ) );
/** * Returns the metadata keys that allow identification of this device profile. * <p> * Note: if the returned array contains an empty string value (not * <code>null</code>, but <code>""</code>!), it means that this profile can be * used for <em>all</em> devices. * </p> * * @return an array of metadata keys this profile supports, never * <code>null</code>. */ public String[] getDeviceMetadataKeys() { final String rawValue = this.properties.get( DEVICE_METADATA_KEYS ); return StringUtils.tokenizeQuotedStrings( rawValue, ", " ); }
/** * @param aTableRow * @param aIdx * @param aSampleIdx * @param aValue */ private void addDataValues( final Element aTableRow, final int aIdx, final int aSampleIdx, final int aValue ) { aTableRow.addChild( TD ).addContent( "0x", integerToHexString( aValue, ( bitCount / 4 ) + bitAdder ) ); aTableRow.addChild( TD ).addContent( "0b", integerToBinString( aValue, bitCount ) ); aTableRow.addChild( TD ).addContent( String.valueOf( aValue ) ); aTableRow.addChild( TD ).addContent( toASCII( aValue ) ); } };
integerToHexString( ds.getBlock(), 2 ), StringUtils.integerToHexString( ds.getAddress(), 4 ), integerToHexString( ds.getValue(), 4 ), ds.getBusGrant() ? "X" : "-", ds.getType(), ds.getEvent() );
/** * @see javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax.swing.JList, * java.lang.Object, int, boolean, boolean) */ @Override @SuppressWarnings( "unchecked" ) public Component getListCellRendererComponent( final JList aList, final Object aValue, final int aIndex, final boolean aIsSelected, final boolean aCellHasFocus ) { final String text; if ( aValue instanceof Enum<?> ) { text = getDisplayValue( ( ENUM_TYPE )aValue ); } else { text = getFallbackValue( aValue ); } final Component renderer = super.getListCellRendererComponent( aList, text, aIndex, aIsSelected, aCellHasFocus ); if ( renderer instanceof JComponent ) { final String toolTipText = getToolTip( aValue ); if ( !StringUtils.isEmpty( toolTipText ) ) { ( ( JComponent )renderer ).setToolTipText( toolTipText ); } } return renderer; }
/** * Removes all double quotes from the given input. * * @param aInput * the input string to remove the quotes from, may be * <code>null</code>. * @return the unquoted version of the given input, or <code>null</code> if * the original input was <code>null</code>. * @see #unquote(String, char) */ public static String unquote( final String aInput ) { return unquote( aInput, '"' ); }
tr.addChild( TD ).addContent( "0x", integerToHexString( data, ( bitCount / 4 ) + bitAdder ) ); tr.addChild( TD ).addContent( "0b", integerToBinString( data, bitCount ) ); tr.addChild( TD ).addContent( String.valueOf( data ) ); tr.addChild( TD ).addContent( toASCII( data ) );
tr.addChild( TD ).addContent( String.valueOf( index ) ); tr.addChild( TD ).addContent( String.valueOf( data.getClocks() ) ); tr.addChild( TD ).addContent( integerToHexString( data.getBlock(), 2 ) ); tr.addChild( TD ).addContent( integerToHexString( data.getAddress(), 4 ) ); tr.addChild( TD ).addContent( integerToHexString( data.getValue(), 4 ) ); tr.addChild( TD ).addContent( data.getBusGrant() ? "X" : "-" ); tr.addChild( TD ).addContent( data.getType() );
/** * Updates the title and any other window decorations for the current running * platform. * * @param aProject * the project to take the current properties from, can be * <code>null</code>. */ private void updateWindowDecorations( final Project aProject ) { String title = this.controller.getHostProperties().getFullName(); if ( ( aProject != null ) && !StringUtils.isEmpty( aProject.getName() ) ) { // Denote the project file in the title of the main window... title = title.concat( " :: " ).concat( aProject.getName() ); } setTitle( title ); getRootPane().putClientProperty( "Window.documentModified", Boolean.valueOf( aProject.isChanged() ) ); } }
tr.addChild( TD ).addContent( String.valueOf( i ) ); tr.addChild( TD ).addContent( Unit.Time.format( aAnalysisResult.getTime( data.getStartSampleIndex() ) ) ); tr.addChild( TD ).addContent( "0x" + integerToHexString( value, 2 ) ); tr.addChild( TD ).addContent( "0b" + integerToBinString( value, 8 ) ); tr.addChild( TD ).addContent( String.valueOf( value ) ); tr.addChild( TD ).addContent( toASCII( value ) );
/** * Writes down all variable definitions. * * @param aWriter * the print writer to write to, cannot be <code>null</code>; * @param aContainer * the data container to take the channel information from, cannot be * <code>null</code>. */ protected void writeVariableDefinitions( final PrintWriter aWriter, final DataSet aDataSet ) { final AcquisitionResult capturedData = aDataSet.getCapturedData(); final int channelMask = capturedData.getEnabledChannels(); final Channel[] channelLabels = aDataSet.getChannels(); for ( int i = 0; i < channelLabels.length; i++ ) { if ( ( channelMask & ( 1 << i ) ) == 0 ) { continue; } String label = channelLabels[i].getLabel(); if ( StringUtils.isEmpty( label ) ) { label = "channel" + i; } writeVariable( aWriter, i, label ); } }
tr.addChild( TD ).addContent( String.valueOf( i ) ); tr.addChild( TD ).addContent( Unit.Time.format( aAnalysisResult.getTime( data.getStartSampleIndex() ) ) ); tr.addChild( TD ).addContent( "0x", integerToHexString( value, 2 ) ); tr.addChild( TD ).addContent( "0b", integerToBinString( value, 8 ) ); tr.addChild( TD ).addContent( String.valueOf( value ) ); tr.addChild( TD ).addContent( toASCII( value ) );
rxDataHex = integerToHexString( rxData, ( bitCount / 4 ) + bitAdder ); rxDataBin = integerToBinString( rxData, bitCount ); rxDataDec = String.valueOf( rxData ); rxDataASCII = toASCII( ( char )rxData ); txDataHex = integerToHexString( txData, ( bitCount / 4 ) + bitAdder ); txDataBin = integerToBinString( txData, bitCount ); txDataDec = String.valueOf( txData ); txDataASCII = toASCII( txData );