Indicadores, progreso y gauges · jdashboardUI 23.5 · B4J / JavaFX
Indicador circular de progreso con mínimo/máximo, valor animado, porcentaje o valor central, título y exportación PNG.
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
Indicador circular de progreso con mínimo/máximo, valor animado, porcentaje o valor central, título y exportación PNG.
Designer Properties
| Property | Type | Default | Description |
|---|---|---|---|
| MinValue | Float | 0 |
Minimum value of the progress. |
| MaxValue | Float | 100 |
Maximum value of the progress. |
| CurrentValue | Float | 50 |
Current value of the progress. |
| StrokeWidth | Int | 10 |
Thickness of the arc in dip. |
| ProgressColor | Color | 0xFFFF5555 |
Color of the progress arc. |
| CenterText | String | `` | Custom text for the center (leave blank to use value). |
| DisplayAs | String | Progress |
Display mode for center text (Progress or Percentage) |
| AnimationDuration | Int | 1000 |
Duration of the progress animation in milliseconds. |
| TitleText | String | `` | Title text to display above the progress circle. |
Creación y ciclo de vida
Private JCircularProgressBar1 As JCircularProgressBar
JCircularProgressBar1.Initialize(Me, "JCircularProgressBar1")
JCircularProgressBar1.AddToParent(Root, 20dip, 20dip, 640dip, 360dip)
Ejemplo funcional
JCircularProgressBar1.ValueMin = 0
JCircularProgressBar1.ValueMax = 100
JCircularProgressBar1.CenterType = JCircularProgressBar1.TypePercentage
JCircularProgressBar1.Title = "CPU"
JCircularProgressBar1.Value = 72
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 |
|---|---|---|
| Value | read / write | Float |
| Color | read / write | Int |
| CenterType | write | String |
| WidthStroke | write | Int |
| Title | write | String |
| TitleTextColor | write | Int |
| TitleFont | write | B4XFont |
| ValueMin | write | Float |
| ValueMax | write | Float |
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 centro puede mostrar Progress o Percentage. 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, Left As Int, Top As Int, Width As Int, Height As Int)setCenterType(CenterType As String)DrawProgress()setValue(Value As Float)getValue() As FloatsetColor(Color As Int)getColor() As IntSaveAsPNG(Dir As String, FileName As String, BackgroundColor As Int) As BooleansetWidthStroke(Width As Int)setTitle(Text As String)setTitleTextColor(Color As Int)setTitleFont(Font As B4XFont)setValueMin(Value As Float)setValueMax(Value As Float)
Componentes relacionados
- jdashboard_CircularProgressBar
- JGaugeProgress
- jGauge