Logo Search packages:      
Sourcecode: cadencii version File versions  Download package

Public Member Functions | Public Attributes | Protected Member Functions | Events | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

org::kbinani::cadencii::TrackSelector Class Reference

コントロールカーブ,トラックの一覧,歌手変更イベントなどを表示するコンポーネント. More...

Inheritance diagram for org::kbinani::cadencii::TrackSelector:
Inheritance graph
Collaboration diagram for org::kbinani::cadencii::TrackSelector:
Collaboration graph

List of all members.

Public Member Functions

void applyFont (java.awt.Font font)
void applyLanguage ()
void cmenuCurveCommon_Click (Object sender, BEventArgs e)
void cmenusinger_Click (Object sender, BEventArgs e)
void cmenusinger_MouseEnter (Object sender, BEventArgs e)
void cmenusinger_MouseHover (Object sender, BEventArgs e)
void cmenuSinger_VisibleChanged (Object sender, BEventArgs e)
void componentHidden (ComponentEvent e)
void componentMoved (ComponentEvent e)
void componentResized (ComponentEvent e)
void componentShown (ComponentEvent e)
void drawVEL (Graphics2D g, VsqTrack track, Color color, boolean is_front, CurveType type)
void drawVibratoControlCurve (Graphics2D g, VsqTrack draw_target, CurveType type, Color color, boolean is_front)
 ビブラートのRate, Depthカーブを描画します
void drawVsqBPList (Graphics2D g, VsqBPList list, Color color, boolean is_front)
void focusGained (FocusEvent e)
void focusLost (FocusEvent e)
org.kbinani.java.awt.Color getBackground ()
org.kbinani.java.awt.Rectangle getBounds ()
org.kbinani.java.awt.Cursor getCursor ()
org.kbinani.java.awt.Font getFont ()
org.kbinani.java.awt.Color getForeground ()
int getGraphHeight ()
int getGraphWidth ()
int getHeight ()
FormMain getMainForm ()
java.awt.Dimension getMaximumSize ()
java.awt.Dimension getMinimumSize ()
String getName ()
Object getParent ()
int getPreferredMinSize ()
Rectangle getRectFromCurveType (CurveType curve)
int getRowsPerColumn ()
float getScaleY ()
CurveType getSelectedCurve ()
ValuePair< Integer, Integer > getSelectedRegion ()
int getSelectorWidth ()
org.kbinani.java.awt.Dimension getSize ()
Object getTag ()
int getWidth ()
BezierPoint HandleMouseMoveForBezierMove (int clock, int value, int value_raw, BezierPickedSide picked)
BezierPoint HandleMouseMoveForBezierMove (BMouseEventArgs e, BezierPickedSide picked)
void invalidate ()
boolean isCurveVisible ()
bool isEnabled ()
bool isFocusOwner ()
bool isVisible ()
void keyPressed (KeyEvent e)
void keyReleased (KeyEvent e)
void keyTyped (KeyEvent e)
void mouseClicked (MouseEvent e)
void mouseDragged (MouseEvent e)
void mouseEntered (MouseEvent e)
void mouseExited (MouseEvent e)
void mouseMoved (MouseEvent e)
void mousePressed (MouseEvent e)
void mouseReleased (MouseEvent e)
void mouseWheelMoved (MouseWheelEvent e)
void paint (Graphics graphics)
java.awt.Point pointToClient (java.awt.Point point_on_screen)
java.awt.Point pointToScreen (java.awt.Point point_on_client)
void prepareSingerMenu (RendererKind renderer)
void requestFocus ()
void SelectNextCurve ()
void SelectPreviousCurve ()
void setBackground (org.kbinani.java.awt.Color color)
void setBounds (org.kbinani.java.awt.Rectangle rc)
void setBounds (int x, int y, int width, int height)
void setCursor (org.kbinani.java.awt.Cursor value)
void setCurveVisible (boolean value)
void setEnabled (bool value)
void setFont (org.kbinani.java.awt.Font font)
void setForeground (org.kbinani.java.awt.Color color)
void setMaximumSize (java.awt.Dimension value)
void setMinimumSize (java.awt.Dimension value)
void setName (String value)
void setName (string value)
void setPreferredSize (org.kbinani.java.awt.Dimension size)
void setSelectedCurve (CurveType value)
void setSize (org.kbinani.java.awt.Dimension d)
void setSize (int width, int height)
void setTag (Object value)
void setVisible (bool value)
 TrackSelector (FormMain main_window)
 TrackSelector ()
void TrackSelector_KeyDown (Object sender, BKeyEventArgs e)
void TrackSelector_KeyUp (Object sender, BKeyEventArgs e)
void TrackSelector_Load (Object sender, BEventArgs e)
void TrackSelector_MouseClick (Object sender, BMouseEventArgs e)
void TrackSelector_MouseDoubleClick (Object sender, BMouseEventArgs e)
void TrackSelector_MouseDown (Object sender, BMouseEventArgs e)
void TrackSelector_MouseHover (Object sender, BEventArgs e)
void TrackSelector_MouseMove (Object sender, BMouseEventArgs e)
void TrackSelector_MouseUp (Object sender, BMouseEventArgs e)
void updateVisibleCurves ()
int valueFromYCoord (int y)
int valueFromYCoord (int y, int max, int min)
int yCoordFromValue (int value, int max, int min)
int yCoordFromValue (int value)

Public Attributes

final BEvent< BEventHandlerenterEvent = new BEvent<BEventHandler>()
const int HEADER = 8
final BEvent< BKeyEventHandlerkeyDownEvent = new BEvent<BKeyEventHandler>()
final BEvent
< BKeyPressEventHandler
keyPressEvent = new BEvent<BKeyPressEventHandler>()
final BEvent< BKeyEventHandlerkeyUpEvent = new BEvent<BKeyEventHandler>()
final BEvent< BEventHandlerleaveEvent = new BEvent<BEventHandler>()
int mEditingChainID = -1
int mEditingPointID = -1
final BEvent< BMouseEventHandlermouseClickEvent = new BEvent<BMouseEventHandler>()
final BEvent< BMouseEventHandlermouseDoubleClickEvent = new BEvent<BMouseEventHandler>()
final BEvent< BMouseEventHandlermouseDownEvent = new BEvent<BMouseEventHandler>()
final BEvent< BEventHandlermouseEnterEvent = new BEvent<BEventHandler>()
final BEvent< BEventHandlermouseLeaveEvent = new BEvent<BEventHandler>()
final BEvent< BMouseEventHandlermouseMoveEvent = new BEvent<BMouseEventHandler>()
final BEvent< BMouseEventHandlermouseUpEvent = new BEvent<BMouseEventHandler>()
final BEvent< BMouseEventHandlermouseWheelEvent = new BEvent<BMouseEventHandler>()
const int OFFSET_TRACK_TAB = 19
final BEvent< BPaintEventHandlerpaintEvent = new BEvent<BPaintEventHandler>()
final BEvent
< BPreviewKeyDownEventHandler
previewKeyDownEvent = new BEvent<BPreviewKeyDownEventHandler>()
final BEvent< BEventHandlerresizeEvent = new BEvent<BEventHandler>()
const int VEL_BAR_WIDTH = 8
final BEvent< BEventHandlervisibleChangedEvent = new BEvent<BEventHandler>()

Protected Member Functions

override void Dispose (boolean disposing)
override void OnPaint (System.Windows.Forms.PaintEventArgs e)


BEventHandler CommandExecuted
BEventHandler PreferredMinHeightChanged
RenderRequiredEventHandler RenderRequired
SelectedCurveChangedEventHandler SelectedCurveChanged
SelectedTrackChangedEventHandler SelectedTrackChanged

Private Types

enum  MouseDownMode {

Private Member Functions

void changeCurve (CurveType curve)
void drawAttachedCurve (Graphics2D g, Vector< BezierChain > chains)
void drawEnvelope (Graphics2D g, int track_index, Color fill_color)
void drawPreutteranceAndOverlap (Graphics2D g, int px_preutterance, int px_overlap, float preutterance, float overlap)
void drawTrackTab (Graphics2D g, Rectangle destRect, String name, boolean selected, boolean enabled, boolean render_required, Color hilight, Color render_button_hilight)
void executeCommand (CadenciiCommand command, boolean register)
void findBezierPointAt (int locx, int locy, Vector< BezierChain > list, ByRef< BezierChain > found_chain, ByRef< BezierPoint > found_point, ByRef< BezierPickedSide > found_side, int dot_width, int px_tolerance)
long findDataPointAt (int locx, int locy)
boolean findEnvelopeCore (int locx, int locy, ByRef< Integer > internal_id, ByRef< Integer > point_kind, ByRef< Boolean > found_flag_was_overlap)
boolean findEnvelopePointAt (int locx, int locy, ByRef< Integer > internal_id, ByRef< Integer > point_kind)
VsqEvent findItemAt (int locx, int locy)
boolean findPreUtteranceOrOverlapAt (int locx, int locy, ByRef< Integer > internal_id, ByRef< Boolean > found_flag_was_overlap)
BPopupMenu getCmenuCurve ()
BMenuItem getCmenuCurveAccent ()
BMenuItem getCmenuCurveBreathiness ()
BMenuItem getCmenuCurveBrightness ()
BMenuItem getCmenuCurveClearness ()
BMenuItem getCmenuCurveDecay ()
BMenuItem getCmenuCurveDynamics ()
BMenuItem getCmenuCurveEffect2Depth ()
BMenuItem getCmenuCurveEnvelope ()
BMenuItem getCmenuCurveGenderFactor ()
BMenuItem getCmenuCurveHarmonics ()
BMenuItem getCmenuCurveOpening ()
BMenuItem getCmenuCurvePitchBend ()
BMenuItem getCmenuCurvePitchBendSensitivity ()
BMenuItem getCmenuCurvePortamentoTiming ()
BMenu getCmenuCurveReso1 ()
BMenuItem getCmenuCurveReso1Amp ()
BMenuItem getCmenuCurveReso1BW ()
BMenuItem getCmenuCurveReso1Freq ()
BMenu getCmenuCurveReso2 ()
BMenuItem getCmenuCurveReso2Amp ()
BMenuItem getCmenuCurveReso2BW ()
BMenuItem getCmenuCurveReso2Freq ()
BMenu getCmenuCurveReso3 ()
BMenuItem getCmenuCurveReso3Amp ()
BMenuItem getCmenuCurveReso3BW ()
BMenuItem getCmenuCurveReso3Freq ()
BMenu getCmenuCurveReso4 ()
BMenuItem getCmenuCurveReso4Amp ()
BMenuItem getCmenuCurveReso4BW ()
BMenuItem getCmenuCurveReso4Freq ()
JSeparator getCmenuCurveSeparator1 ()
JSeparator getCmenuCurveSeparator2 ()
JSeparator getCmenuCurveSeparator3 ()
JSeparator getCmenuCurveSeparator4 ()
JSeparator getCmenuCurveSeparator5 ()
BMenuItem getCmenuCurveVelocity ()
BMenuItem getCmenuCurveVibratoDepth ()
BMenuItem getCmenuCurveVibratoRate ()
TrackSelectorSingerPopupMenu getCmenuSinger ()
CurveType getCurveTypeFromMenu (BMenuItem menu)
Polygon getEnvelopePoints (TempoVector tempo_table, VsqEvent prev_item, VsqEvent item, VsqEvent next_item, ByRef< Integer > px_pre_utteramce, ByRef< Integer > px_overlap)
void getEnvelopeRegion (TempoVector tempo_table, VsqEvent item_prev, VsqEvent item, VsqEvent item_next, ByRef< Double > env_start_sec, ByRef< Double > env_end_sec)
Dimension getFlagBounds (String flag_title)
LineGraphDrawer getGraphDrawer ()
Graphics2D getGraphics ()
JToolTip getJLabel ()
int getMaxColumns ()
Point getScreenCoord (PointD pt)
BasicStroke getStroke2px ()
BasicStroke getStrokeDefault ()
void initialize ()
void InitializeComponent ()
 デザイナ サポートに必要なメソッドです。このメソッドの内容を コード エディタで変更しないでください。
boolean isVisibleOnScreen (int visibleMinX, int visibleMaxX, int startX, int endX)
void MouseHoverEventGenerator ()
boolean processMouseDownBezier (BMouseEventArgs e)
boolean processMouseDownEnvelope (BMouseEventArgs e)
boolean processMouseDownPreutteranceAndOverlap (BMouseEventArgs e)
void processMouseDownSelectRegion (BMouseEventArgs e)
void registerEventHandlers ()
void setResources ()
void toolTip_Draw (Object sender, System.Windows.Forms.DrawToolTipEventArgs e)

Static Private Member Functions

static PointD getCounterPoint (PointD base_point, PointD slave_point_original, PointD moving_point, double scalex, double scaley)
 slave_point_original, base_point, moving_pointがこの順で1直線に並んでいる時, base_pointを回転軸としてmoving_pointを動かした場合に, 回転に伴ってslave_point_originalが移動した先の座標を計算します. ただし,上記の各点の座標値はscalex,scaleyを乗じた上で計算されます
static String getFlagTitle (boolean flag_is_pre_utterance, float value)
static boolean isInRect (int x, int y, Rectangle rc)

Private Attributes

const int BUF_LEN = 512
BPopupMenu cmenuCurve = null
BMenuItem cmenuCurveAccent = null
BMenuItem cmenuCurveBreathiness = null
BMenuItem cmenuCurveBrightness = null
BMenuItem cmenuCurveClearness = null
BMenuItem cmenuCurveDecay = null
BMenuItem cmenuCurveDynamics = null
BMenuItem cmenuCurveEffect2Depth = null
BMenuItem cmenuCurveEnvelope = null
BMenuItem cmenuCurveGenderFactor = null
BMenuItem cmenuCurveHarmonics = null
BMenuItem cmenuCurveOpening = null
BMenuItem cmenuCurvePitchBend = null
BMenuItem cmenuCurvePitchBendSensitivity = null
BMenuItem cmenuCurvePortamentoTiming = null
BMenu cmenuCurveReso1 = null
BMenuItem cmenuCurveReso1
BMenuItem cmenuCurveReso1Amp = null
BMenuItem cmenuCurveReso1BW = null
BMenuItem cmenuCurveReso1Freq = null
BMenu cmenuCurveReso2 = null
BMenuItem cmenuCurveReso2
BMenuItem cmenuCurveReso2Amp = null
BMenuItem cmenuCurveReso2BW = null
BMenuItem cmenuCurveReso2Freq = null
BMenu cmenuCurveReso3 = null
BMenuItem cmenuCurveReso3
BMenuItem cmenuCurveReso3Amp = null
BMenuItem cmenuCurveReso3BW = null
BMenuItem cmenuCurveReso3Freq = null
BMenu cmenuCurveReso4 = null
BMenuItem cmenuCurveReso4
BMenuItem cmenuCurveReso4Amp = null
BMenuItem cmenuCurveReso4BW = null
BMenuItem cmenuCurveReso4Freq = null
JSeparator cmenuCurveSeparator1 = null
BMenuSeparator cmenuCurveSeparator1
JSeparator cmenuCurveSeparator2 = null
BMenuSeparator cmenuCurveSeparator2
BMenuSeparator cmenuCurveSeparator3
JSeparator cmenuCurveSeparator3 = null
JSeparator cmenuCurveSeparator4 = null
BMenuSeparator cmenuCurveSeparator4
JSeparator cmenuCurveSeparator5 = null
BMenuSeparator cmenuCurveSeparator5
BMenuItem cmenuCurveVelocity = null
BMenuItem cmenuCurveVibratoDepth = null
BMenuItem cmenuCurveVibratoRate = null
TrackSelectorSingerPopupMenu cmenuSinger = null
System.ComponentModel.IContainer components = null
const int DOT_WID = 3
 カーブ制御点の幅(実際は_DOT_WID * 2 + 1ピクセルで描画される)
const int FLAG_SPACE = 2
const int FOOTER = 7
 カーブの種類を除いた部分の高さ(ピクセル). TrackSelectorの推奨表示高さは,HEIGHT_WITHOUT_CURVE + UNIT_HEIGHT_PER_CURVE * (カーブの個数)となる
RendererKind mCMenuSingerPrepared = RendererKind.NULL
int[] mCMenuSingerTooltipWidth
boolean mCurveVisible = true
BezierChain mEditingBezierOriginal = null
double mEnvelopeDotBegin
double mEnvelopeDotEnd
int mEnvelopeEdigintID = -1
UstEnvelope mEnvelopeEditing = null
UstEnvelope mEnvelopeOriginal = null
int mEnvelopePointKind = -1
double mEnvelopeRangeBegin
double mEnvelopeRangeEnd
LineGraphDrawer mGraphDrawer = null
Graphics2D mGraphics = null
int mLastPreferredMinHeight
 このコントロールの推奨最少表示高さの前回の値. 推奨表示高さが変わったかどうかを検出するのに使う
CurveType mLastSelectedCurve = CurveType.DYN
FormMain mMainWindow = null
TreeMap< CurveType, BMenuItemmMenuMap = new TreeMap<CurveType, BMenuItem>()
int mModifierKey = InputEvent.CTRL_MASK
int mModifierOnMouseDown = 0
boolean mMouseDowned = false
Point mMouseDownLocation = new Point()
MouseDownMode mMouseDownMode = MouseDownMode.NONE
Thread mMouseHoverThread = null
boolean mMouseMoved = false
MouseTracer mMouseTracer = new MouseTracer()
int mMouseValue
Vector< BPPairmMovingPoints = new Vector<BPPair>()
int mOverlapEditingID
boolean mPencilMoved = false
VsqEvent mPreOverlapEditing = null
VsqEvent mPreOverlapOriginal = null
int mPreUtteranceEditingID
CurveType mSelectedCurve = CurveType.VEL
int mSingerMoveStartedClock
boolean mSpaceKeyDowned = false
 スペースキーが押されているかどうか。 MouseDown時に範囲選択モードをスキップする必要があるので、FormMainでの処理に加えてこのクラス内部でも処理する必要がある
BasicStroke mStroke2px = null
BasicStroke mStrokeDefault = null
int mTextHeight = 0
 Overlap, Presendを描画するときに使うフォントの,文字の描画高さ
float mTextWidthPerLetter = 0.0f
 Overlap, Presendを描画するときに使うフォントで,一文字あたり何ピクセルになるか
int mTooltipLanguage
int mTooltipProgram
int mVelEditLastSelectedID = -1
TreeMap< Integer,
mVelEditSelected = new TreeMap<Integer, SelectedEventEntry>()
int mVelEditShiftY = 0
Vector< CurveTypemViewingCurves = new Vector<CurveType>()
const int NUM_PCOUNTER = 50
const int OFFSET_OVL = 40
const int OFFSET_PRE = 15
const int PX_WIDTH_RENDER = 10
const int SINGER_ITEM_WIDTH = 66
System.Windows.Forms.ToolTip toolTip
JToolTip toolTip = null
const int UNIT_HEIGHT_PER_CURVE = 18
 カーブの種類を表す部分の,1個あたりの高さ(ピクセル,余白を含む) TrackSelectorの推奨表示高さは,HEIGHT_WITHOUT_CURVE + UNIT_HEIGHT_PER_CURVE * (カーブの個数)となる

Static Private Attributes

static readonly Color COLOR_A072R255G255B255 = new Color( 255, 255, 255, 72 )
static readonly Color COLOR_A098R000G000B000 = new Color( 0, 0, 0, 98 )
static readonly Color COLOR_A127R008G166B172 = new Color( 8, 166, 172, 127 )
static readonly Color COLOR_A144R255G255B255 = new Color( 255, 255, 255, 144 )
static readonly Color COLOR_A244R255G023B012 = new Color( 255, 23, 12, 244 )
static readonly Color COLOR_BEZIER_AUXILIARY = Color.orange
static readonly Color COLOR_BEZIER_CURVE = PortUtil.Navy
static readonly Color COLOR_BEZIER_DOT_BASE = new Color( 125, 198, 34 )
static readonly Color COLOR_BEZIER_DOT_BASE_DARK = new Color( 62, 99, 17 )
static readonly Color COLOR_BEZIER_DOT_NORMAL = new Color( 237, 107, 158 )
static readonly Color COLOR_BEZIER_DOT_NORMAL_DARK = new Color( 153, 19, 70 )
static readonly Color COLOR_DOT_HILIGHT = PortUtil.Coral
static readonly Color COLOR_MOUSE_TRACER = new Color( 8, 166, 172, 127 )
static readonly Color COLOR_SINGERBOX_BORDER = new Color( 182, 182, 182 )
static readonly Color COLOR_SINGERBOX_BORDER_HILIGHT = new Color( 246, 251, 10 )
static readonly Color COLOR_VIBRATO_SHADOW = new Color( 0, 0, 0, 127 )
static final long serialVersionUID = 1L

Detailed Description


Definition at line 15 of file TrackSelector.java.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index