Indicadores, progreso y gauges · jdashboardUI 23.5 · B4J / JavaFX
Gauge/progreso con arco, indicador, modo Half Circle / Full Circle, título y animación de valor.
La imagen mostrada en esta página es una referencia visual creada para la documentación. No pretende ser una captura pixel-perfect del control; el resultado real depende del tamaño, tema, colores y datos.
Características destacadas
- Exportación PNG
- Animación configurable
- Título configurable
- Interacción por clic
- Valor animado
Cuándo usarlo
Gauge/progreso con arco, indicador, modo Half Circle / Full Circle, título y animación de valor.
Designer Properties
| Property | Type | Default | Description |
|---|---|---|---|
| MinValue | Float | 0 |
|
| MaxValue | Float | 100 |
|
| IndicatorLength | Int | 20 |
|
| IndicatorColor | Color | 0xFFFF5555 |
|
| StrokeWidth | Int | 10 |
|
| Duration | Int | 3000 |
Milliseconds |
| GaugeType | String | Half Circle |
|
| Title | String | Gauge |
|
| TitleColor | Color | 0xFF000000 |
|
| TitleFontSize | Int | 16 |
Size in dip |
| InitialValue | Float | 0 |
Creación y ciclo de vida
Private JGaugeProgress1 As JGaugeProgress
JGaugeProgress1.Initialize(Me, "JGaugeProgress1")
JGaugeProgress1.AddToParent(Root, 20dip, 20dip, 360dip, 260dip, 0xFFFF5555)
Ejemplo funcional
JGaugeProgress1.ValueMin = 0
JGaugeProgress1.ValueMax = 100
JGaugeProgress1.GaugeType = "Half Circle"
JGaugeProgress1.Title = "Performance"
JGaugeProgress1.CurrentValue = 76
Propiedades B4X normalizadas
Los accesores públicos getX/setX compatibles se presentan como propiedades B4X normales. Los métodos parametrizados siguen documentándose como métodos.
| Propiedad | Acceso | Tipo |
|---|---|---|
| CurrentValue | read / write | Float |
| WidthStroke | read / write | Int |
| ValueMin | read / write | Float |
| ValueMax | read / write | Float |
| LengthIndicator | read / write | Int |
| ColorIndicator | read / write | Int |
| AnimationDuration | read / write | Int |
| GaugeType | read | String |
| Title | read / write | String |
| TitleColor | read / write | Int |
| TitleFontSize | read / write | Int |
| TypeGauge | write | String |
Eventos
ValueChanged (NewValue As Float)MouseClicked
Exportación y renderizado
Cuando el módulo expone SaveAsPNG / SavePNG, puedes guardar el estado renderizado del control directamente a PNG. Comprueba el Boolean devuelto cuando exista.
Notas y comportamiento real de la versión analizada
- El gauge puede ser Half Circle o Full Circle. Declara eventos ValueChanged y MouseClicked.
API pública completa
Initialize(Callback As Object, EventName As String)DesignerCreateView(Base As Object, Lbl As Label, Props As Map)AddToParent(Parent As B4XView, l As Int, t As Int, w As Int, h As Int, ColorIndicator As Int)setCurrentValue(v As Float)getCurrentValue() As FloatSaveAsPNG(Dir As String, FileName As String, BackgroundColor As Int) As BooleansetWidthStroke(Width As Int)getWidthStroke() As IntsetValueMin(Value As Float)getValueMin() As FloatsetValueMax(Value As Float)getValueMax() As FloatsetLengthIndicator(Length As Int)getLengthIndicator() As IntsetColorIndicator(Color As Int)getColorIndicator() As IntsetAnimationDuration(Duration As Int)getAnimationDuration() As IntsetTypeGauge(TypeGauge As String)getGaugeType() As StringsetTitle(Text As String)getTitle() As StringsetTitleColor(Color As Int)getTitleColor() As IntsetTitleFontSize(Size As Int)getTitleFontSize() As Int
Componentes relacionados
- jGauge
- JCircularProgressBar