本文整理汇总了Java中org.herac.tuxguitar.song.models.TGDuration.setDoubleDotted方法的典型用法代码示例。如果您正苦于以下问题:Java TGDuration.setDoubleDotted方法的具体用法?Java TGDuration.setDoubleDotted怎么用?Java TGDuration.setDoubleDotted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.herac.tuxguitar.song.models.TGDuration
的用法示例。
在下文中一共展示了TGDuration.setDoubleDotted方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseRhythm
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
private void parseRhythm(GPXRhythm gpRhythm , TGDuration tgDuration){
tgDuration.setDotted(gpRhythm.getAugmentationDotCount() == 1);
tgDuration.setDoubleDotted(gpRhythm.getAugmentationDotCount() == 2);
tgDuration.getDivision().setTimes(gpRhythm.getPrimaryTupletDen());
tgDuration.getDivision().setEnters(gpRhythm.getPrimaryTupletNum());
if(gpRhythm.getNoteValue().equals("Whole")){
tgDuration.setValue(TGDuration.WHOLE);
}else if(gpRhythm.getNoteValue().equals("Half")){
tgDuration.setValue(TGDuration.HALF);
}else if(gpRhythm.getNoteValue().equals("Quarter")){
tgDuration.setValue(TGDuration.QUARTER);
}else if(gpRhythm.getNoteValue().equals("Eighth")){
tgDuration.setValue(TGDuration.EIGHTH);
}else if(gpRhythm.getNoteValue().equals("16th")){
tgDuration.setValue(TGDuration.SIXTEENTH);
}else if(gpRhythm.getNoteValue().equals("32nd")){
tgDuration.setValue(TGDuration.THIRTY_SECOND);
}else if(gpRhythm.getNoteValue().equals("64th")){
tgDuration.setValue(TGDuration.SIXTY_FOURTH);
}
}
示例2: createDurations
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
public static List<TGDuration> createDurations(TGFactory factory,long time){
List<TGDuration> durations = new ArrayList<TGDuration>();
TGDuration minimum = factory.newDuration();
minimum.setValue(TGDuration.SIXTY_FOURTH);
minimum.setDotted(false);
minimum.setDoubleDotted(false);
minimum.getDivision().setEnters(3);
minimum.getDivision().setTimes(2);
long missingTime = time;
while( missingTime > minimum.getTime() ){
TGDuration duration = TGDuration.fromTime(factory, missingTime, minimum , 10);
durations.add( duration.clone(factory) );
missingTime -= duration.getTime();
}
return durations;
}
示例3: readDuration
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
private void readDuration(TGDuration duration) throws IOException{
int header = readHeader();
// leo el puntillo
duration.setDotted((header & DURATION_DOTTED) != 0);
//leo el doble puntillo
duration.setDoubleDotted((header & DURATION_DOUBLE_DOTTED) != 0);
//leo el valor
duration.setValue(readByte());
//leo el tipo de divisiones
if(((header & DURATION_NO_TUPLET) != 0)){
readDivisionType(duration.getDivision());
}
else{
duration.getDivision().copyFrom(TGDivisionType.NORMAL);
}
}
示例4: processAction
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
if( duration.getValue() < TGDuration.SIXTY_FOURTH ){
duration.setValue(duration.getValue() * 2);
duration.setDotted(false);
duration.setDoubleDotted(false);
TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
tgActionManager.execute(TGSetDurationAction.NAME, context);
}
}
示例5: processAction
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
TGVoice voice = ((TGVoice) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_VOICE));
TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
if( duration.getValue() != VALUE || (!voice.isEmpty() && voice.getDuration().getValue() != VALUE) ){
duration.setValue(VALUE);
duration.setDotted(false);
duration.setDoubleDotted(false);
TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
tgActionManager.execute(TGSetDurationAction.NAME, context);
}
}
示例6: processAction
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
duration.setDotted(!duration.isDotted());
duration.setDoubleDotted(false);
TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
tgActionManager.execute(TGSetDurationAction.NAME, context);
}
示例7: processAction
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
duration.setDoubleDotted(!duration.isDoubleDotted());
duration.setDotted(false);
TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
tgActionManager.execute(TGSetDurationAction.NAME, context);
}
示例8: processAction
import org.herac.tuxguitar.song.models.TGDuration; //导入方法依赖的package包/类
protected void processAction(TGActionContext context) {
TGDuration duration = ((TGDuration) context.getAttribute(TGDocumentContextAttributes.ATTRIBUTE_DURATION));
if( duration.getValue() > TGDuration.WHOLE ){
duration.setValue(duration.getValue() / 2);
duration.setDotted(false);
duration.setDoubleDotted(false);
TGActionManager tgActionManager = TGActionManager.getInstance(getContext());
tgActionManager.execute(TGSetDurationAction.NAME, context);
}
}