📄 interlinear.java
字号:
*/ public ArrayList getVisibleTiers() { return visibleTiers; } /** * Returns the currently visible time interval. * * @return the currently visible time interval, begin and end time */ public long[] getVisibleTimeInterval() { return visibleTimeInterval; } /** * Returns the width of the output area, either in pixels or in number of * bytes or characters * * @return the output width */ public int getWidth() { if (width > 0) { return width; } else { // find width from max horizontally used space //return metrics.getMaxHorizontallyUsedWidth(); return 0; } } /** * Sets the active annotation. * * @param annotation the active annotation */ public void setActiveAnnotation(Annotation annotation) { activeAnnotation = annotation; } /** * Sets the alignment unit. * * @param i the new alignment unit * * @see #getAlignmentUnit() */ public void setAlignmentUnit(int i) { alignmentUnit = i; } /** * Sets the block wrap style type. * * @param i the new block wrap style type * * @see #getBlockWrapStyle() */ public void setBlockWrapStyle(int i) { blockWrapStyle = i; } /** * Sets the empty slots shown value. * * @param b the new empty slots shown value * * @see #getEmptyLineStyle() */ public void setEmptySlotsShown(boolean b) { emptySlotsShown = b; } /** * Sets the (total) height necessary for the output. * * @param i the new height */ public void setHeight(int i) { height = i; } /** * Sets the number of pixels to insert between lines. * * @param i the space between two lines */ public void setLineSpacing(int i) { lineSpacing = i; } /** * Sets the line wrap style. * * @param i the line wrap style * * @see #getLineWrapStyle() */ public void setLineWrapStyle(int i) { lineWrapStyle = i; } /** * Sets the current media time. * * @param l the time in ms */ public void setMediaTime(long l) { mediaTime = l; } /** * Sets the selction begin and end time * * @param ls array of length 2, begin and end time */ public void setSelection(long[] ls) { selection = ls; } /** * Sets the visibility of the tier labels. * * @param show if true include the labels */ public void setTierLabelsShown(boolean show) { tierLabelsShown = show; } /** * Sets whether time code information should be included in the output. * * @param b when true time codes are included in the output */ public void setTimeCodeShown(boolean b) { timeCodeShown = b; } /** * Sets the format for the time codes. * * @param i the format type * * @see #getTimeCodeType() */ public void setTimeCodeType(int i) { timeCodeType = i; } /** * Sets the visible tiers. * * @param strings array of the names of the visible tiers */ public void setVisibleTiers(String[] strings) { visibleTiers.clear(); if (strings != null) { for (int i = 0; i < strings.length; i++) { Tier t = transcription.getTierWithId(strings[i]); if (t != null) { visibleTiers.add(t); } } } } /** * Sets the visible tiers. * * @param visTiers a list of tier objects */ public void setVisibleTiers(ArrayList visTiers) { if (visTiers != null) { visibleTiers = visTiers; } else { visibleTiers.clear(); } } /** * Sets the visible time interval. * * @param ls the begin and end time of the visible time interval, in ms */ public void setVisibleTimeInterval(long[] ls) { visibleTimeInterval = ls; } /** * Sets the width of the document, in pixels, bytes or characters * * @param i the new width * * @see #getWidth() */ public void setWidth(int i) { width = i; } /** * Creates a font object to use for the specified tier, using the * preferred, user defined font size. * * @param tierName the name of the tier * @param f the base font object for the tier */ public void setFont(String tierName, Font f) { int fontSize = getFontSize(tierName); f = f.deriveFont((float) fontSize); fonts.put(tierName, f); } /** * Sets the font size for the specified tier. * * @param tierName the namew of the tier * @param size the size for the font */ public void setFontSize(String tierName, int size) { fontSizes.put(tierName, new Integer(size)); fonts.put(tierName, getFont(tierName).deriveFont((float) size)); } /** * Returns the empty line style. * * @return the empty line style, either <code>TEMPLATE</code> or * <code>HIDE_EMPTY_LINES</code> */ public int getEmptyLineStyle() { return emptyLineStyle; } /** * Sets the empty line style. * * @param i empty line style, either<code>TEMPLATE</code> or * <code>HIDE_EMPTY_LINES</code> */ public void setEmptyLineStyle(int i) { emptyLineStyle = i; } /** * Returns the sorting style (sorting of the tiers). * * @return the sorting style, either <code>EXTERNALLY_SPECIFIED</code>, * <code>TIER_HIERARCHY</code>, <code>BY_LINGUISTIC_TYPE</code> or * <code>BY_PARTICIPANT</code> */ public int getSortingStyle() { return sortingStyle; } /** * Sets the sorting style for the tiers. * * @param i the new sorting style * * @see #getSortingStyle() */ public void setSortingStyle(int i) { sortingStyle = i; } /** * Returns the Transcription object. * * @return the Transcription object */ public TranscriptionImpl getTranscription() { return transcription; } /** * Returns the output mode. * * @return the output mode, either <code>PRINT</code>, * <code>INTERLINEAR_TEXT</code> or <code>SHOEBOX_TEXT</code> */ public int getOutputMode() { return outputMode; } /** * Sets the output mode. * * @param mode the output mode * * @see #getOutputMode() */ public void setOutputMode(int mode) { outputMode = mode; } /** * Returns the page height, in case of <code>PRINT</code> mode. * * @return the page height in pixels */ public int getPageHeight() { return pageHeight; } /** * Sets the page heigth. * * @param height page height in pixels */ public void setPageHeight(int height) { pageHeight = height; } /** * Returns the character encoding for a particular tier. * * @param tierName the tier to find the encoding for * * @return the character encoding */ public int getCharEncoding(String tierName) { int encoding = UTF8; if (tierName == null) { return encoding; // UTF8 is always the default } if (!charEncodings.containsKey(tierName)) { return encoding; } Integer encodingInt = (Integer) charEncodings.get(tierName); if (encodingInt != null) { encoding = encodingInt.intValue(); } return encoding; } /** * Sets the character encoding for a tier. * * @param tierName the tier to specify the encoding for * @param charEncoding the new encoding, either <code>UTF8</code> * (default), <code>ISOLATIN</code>, <code>SIL</code> */ public void setCharEncoding(String tierName, int charEncoding) { charEncodings.put(tierName, new Integer(charEncoding)); } /** * Returns the empty horizontal space between neightbouring annotations. * * @return the empty horizontal space between neightbouring annotations, in * pixels or in number of characters */ public int getEmptySpace() { return emptySpace; } /** * Returns the BlockMetrics object containing the formatted annotation * layout for output. * * @return the object holding the formatted annotation output layout */ public BlockMetrics getMetrics() { return metrics; } /** * Returns whether the output is restricted to the selected time interval. * * @return whether the output is restricted to the selected time interval */ public boolean isSelectionOnly() { return selectionOnly; } /** * Sets whether the output is restricted to the selected time interval. * * @param b if true only the annotations in the selected interval are * included in the output */ public void setSelectionOnly(boolean b) { selectionOnly = b; } /** * Sets whether a single time code line should be used or rather a time * code line per root tier. (Not used yet) * * @param style single Time code line or multiple time code lines, one of * <code>SINGLE_TIMECODE</code>, or <code>MULTIPLE_TIMECODE</code>. */ public void setTimeCodeMultiplicity(int style) { timeCodeMultiplicity = style; } /** * Returns whether a single time code line should be used or rather a time * code line per root tier. * * @return one of <code>SINGLE_TIMECODE</code>, or * <code>MULTIPLE_TIMECODE</code>. */ public int getTimeCodeMultiplicity() { return timeCodeMultiplicity; } /** * @return Returns whether a tab should be inserted between annotations */ public boolean isInsertTabs() { return insertTabs; } /** * Sets whether a tab should be inserted between annotations * * @param insertTabs if true a tab will be inserted (together with a space char */ public void setInsertTabs(boolean insertTabs) { this.insertTabs = insertTabs; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -